Here's what I'm trying to achieve:
My game starts with cEGO sitting in a chair. Once the game starts, the player can either interact (HAND or EYE) an object on the table next to the chair or use WALK to stand up and move freely around the room. While cEGO is sitting, there is an animated view that shows cEGO reaching out to the table next to the chair that he's in.
Here are the problems that I am running into:
Starting out with cEGO sitting:
Code for room_load:
function room_load()
{
cEGO.LockViewFrame(17, 0, 0);
}
Currently, cEGO is sitting when the game starts, however if I use the WALK cursor anywhere else in the room, the view (17) is used as cEGO moves around the room (the game crashes once loop 0 completes, since its not a standard 4 loop view for walking. Once cEGO starts moving using the sitting view, the wait cursor is displayed and nothing else can be done. I have found that if I unlock the view under the function room_AfterFadeIn, cEGO will stand on his own and then everything works (WALK, etc...). I'm using:
function room_AfterFadeIn
{
cEGO.UnlockView();
}
Wasn't sure if I need to use IdleView here, since an animation plays while cEGO is sitting. Also, I thought about using a hotspot for the entire room to make cEGO stand when the WALK cursor was used, but I read in the manual or wiki that the "any click on hotspot" was for anything EXCEPT the walk icon...so I'm stuck at what I need to do from here on this piece.
Next issue is the animation while cEGO is sitting. cEGO "shifts" when the frame is played with his arm outstretched. The view that I'm using is 5 frames. Using the Preview option on the view animates it correctly (no shift), however if I check the Character View (centre pivot) option, the "shift" is there. I have tried using cEGO.LockViewAligned with all 3 alignments with no luck.
In my game's current state, I am doing everything from the room script. I have not attempted and global scripts and/or variables. I'm not opposed to them, it's just not a topic that I've attempted yet... I am not an experienced programmer by any definition (which I'm sure is apparent). Everything that I have has been a self discovery process using the forums/wiki/manual. Please accept my apologies ahead of time if I'm unclear with my explanations.
Thanks in advance for any help/advice!
-j