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
(if(== (send gEgo:onControl()) ctlYELLOW)
(instance egoInWaterScript of Script
(method (changeState newState)
(send gEgo:loop(4)) //in water loop
(send gEgo:setMotion(NULL)) //stop walking
(send gEgo:cel(1)) //knee deep
(send gEgo:cel(2)) //waste deep
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.
Hi Guys! The solution is very simple! For other people, like myself still trying to master SCI, here is the solution:|
Do not call in the doit() function a separate script. Change the code to be something like this:
(if(==(send gEgo:onControl()) ctlYELLOW)
(if(<>(send gEgo:onControl()) ctlYELLOW)
View 300 is a view of Ego swimming in the 4 directions.
View 0 is the default walking view.
You would typically call a script with a ChangeState method if you want to set up a scene where Ego is drowning, then you want to print some messages and lastly call the dying scene.
Any expert out that could advise on the "jump on box problem" - Please!!! It take hours for a beginner to sort it out these things on your own!