AGI1122 |
I am having a bit of a problem with what I want to do with an actor. I have 2 views of an actor, and when the user types a command in it changes to the second view... but the problem is that I want it to change back to the first view once it reaches the end of the second view's loop. Here is what I have so far: /******************************************************************************* I am making the deathscythe shoot which is the second view... it animates just fine and stops at the end of the loop. But I can't for the life of me figure out how to tell if the loop is done or not so that I can change it back to his "standby" picture for when he is standing still. :-\ |
Eigen |
/******************************************************************************/ (instance EndShoot of Script (properties) (method(changeState newState) = newState 0 = state newState (switch(state) (case 0 (deathscythe_shoot: dispose()) (deathscythe_stand:init()) ) ) ) ) (instance RoomScript of Script (properties) (method (handleEvent pEvent) (var dyingScript) (super:handleEvent(pEvent)) /***************************************** * Handle the possible said phrases here * *****************************************/ (if(Said('attack')) (deathscythe_stand:dispose()) (deathscythe_shoot: init() setCycle(End EndShoot) setLoop(2) setStep(5) cel(0) posn(51 170) ) ) (if(Said('debug')) SetDebug() ) //(send gGame:changeScore(1)) /* = dyingScript ScriptID(DYING_SCRIPT) (send dyingScript: caller(10) register("You press the self detonation button.") ) (send gGame:setScript(dyingScript)) */ ) ) /******************************************************************************/ -Eigen |
AGI1122 | Thanks, it worked like a charm... but still a ways to go before I have a working gundam rpg. :) |