Here is today’s update on Arcana Manor, in the form of a post I made to the ArcaneFX section of the Garagegames forum. The only addendum I have is that after this post I managed to fix most of the object selection problems, thanks to the help of the user named Gibby. They were in the playgui.gui file. Next up is the more challenging problem of selecting objects in first-person shooter mode.
In the process of making many script and code changes to implement several different features, I seem to have interfered with the game’s ability to select objects with the mouse rollover raycast. I can select the orc AI player, but only from certain angles (specifically from a slight angle while he is running toward the player, and sometimes from behind if the player is standing close to him). I can’t select the orc corpse at all, even though “corpsehiddenfromraycast” is set to “0″ and “$TypeMasks::CorpseObjectType” is enabled in “AFX::targetSelectionMask.” If I run the AFXDemo from a fresh install of AFX 1.7.1, it is much easier to select the orc and the orc corpse from almost any angle and distance, which suggests to me that I’ve done something to mess up the rolloverraycast function or another piece of code or script related to object selection.
I’ve used WinDiff to check afxtsctrl.cp against the same file in the fresh install of AFXDemo, but restoring this file to its original state doesn’t solve the problem. Could anybody suggest where else I might look for changes to try to fix this problem? I also checked in GameConnection.cpp because I think some of the object selection code is in that file, but I’m wondering where else the problem might be coming from.
To provide a little context, I am working on a game in which the player can cast spells from first-person mode, like in Oblivion. So, one of the ultimate goals here is to be able to select objects in first-person shooter mode by toggling the cursor or using the crosshairs. Gibby’s AFXFps mod and tutorial has been extremely helpful with this, though his solution is to cast spells from a 3rd person “psionics” mode. For some reason, I can select objects in Gibby’s 3rd-person mode but not in his first-person mode, even when I toggle the cursor on. I’ve studied the commands.cs script that Gibby uses to switch modes (which involve showing the reticle and the shapenamehud in first-person mode), but I’m not sure which part of this script would be causing the conflict between first-person mode and object selection.
So, a second question once I fix the raycast problem would be: how can I select objects while staying in first-person mode?