0 Members and 1 Guest are viewing this topic.
Uhhn...no.I mean, Ego walks through some dangerous area and suddenly trips over a rock or something.How do I make Ego trip?
(if (& (send gEgo:onControl()) CONTROL_EGO_TRIP) (send gRoom:setScript(egoTripScript)))
(send gEgo:view(VIEW_TRIP_DIE) setCycle(End self))
(if (& (send gEgo:onControl()) CONTROL_EGO_TRIP) (send gEgo:view(VIEW_TRIP_DIE) setCycle(End egoTripScript)))
Errrm...how do I define EgoTripScript?
(define CONTROL_EGO_TRIP $4000) /* This is ctlYELLOW */(define VIEW_EGO_TRIP 5)(instance egoTripScript of Script (properties) (method (changeState newState) (var dyingScript) (super:changeState(newState)) (switch (newState) (case 0 (send gEgo:view(VIEW_EGO_TRIP) setMotion(NULL) setCycle(End self))) (case 1 ((send gEgo:setCycle(NULL)) = cycles 13)) /* Short pause */ (case 2 (Print("You tripped!")) = dyingScript ScriptID(DYING_SCRIPT) (send dyingScript:caller(VIEW_EGO_TRIP) register("You're dead!")) (send gGame:setScript(dyingScript))) ) ))/******************************************************************************/(instance RoomScript of Script (properties) (method (doit) (if (& (send gEgo:onControl()) CONTROL_EGO_TRIP) (send gRoom:setScript(egoTripScript)) ) ) (method (handleEvent pEvent) (super:handleEvent(pEvent)) /***************************************** * Handle the possible said phrases here * *****************************************/ (if(Said('look')) Print("You are in an empty room") ) ))
SMF 2.0.19 | SMF © 2021, Simple MachinesSimple Audio Video Embedder Page created in 0.226 seconds with 22 queries.