I want to program a scene where Ego walks in the water and gets knee deeper ext. I used a control area in the Roomscript which trigger the egoInWaterScript. All works fine, but once the ChangeState in activated, I cannot reset it. So, if Ego walks in the water again, the scene does not repeats itself.
(instance RoomScript of Script
(properties)
(method (doit)
(super:doit())
(if(== (send gEgo:onControl()) ctlYELLOW)
(send gRoom:setScript(egoInWaterScript))
)//if
)//method
(instance egoInWaterScript of Script
(properties)
(method (changeState newState)
(super:changeState(newState))
=state newState
(switch (state)
(case 0
(send gEgo:loop(4)) //in water loop
(send gEgo:setMotion(NULL)) //stop walking
(send gEgo:cel(1)) //knee deep
=cycles 5
)//case 0
(case 1
(send gEgo:cel(2)) //waste deep
)//case 1
)//switch
)//method
)//instance
Any help on this?
Another question: How can I make Ego to jump onto a box? If you just position him on top of the box, the view priorities hide legs behind the box and this creates the wrong visual impression.