jokokoe wrote:
Hi everybody ! i've already asked for this question in my topic " architecture salon " but I'll ask it again here as more people may read ( and i hope ) anwser it !
I'm trying to script a character that may have the same effect as 7N1E of the scorching path. I'd like beetrho to cut trough tar and when the area selected will have tar where it need and only floor ( or herb or anything else that is not tar ) where it doesn't need , a door will open. I've search a bit on the forum and some people were talking about " wait for item tar " but I've not tar in the list. I have the 5.0.1 version ( is that the latest ? ) . I've also read it was possible to script this using _myscript variable but I've no idea how to do this. Finally if it is possible I'de like to apply this to mud and gel ...
Thank you for you replies !
Ah, the wonderful world of _MyScript variables! There are a lot of things that "
wait for item"
can detect tat are not on the menu for it. To do this, set the _MyScriptF variable to the appropriate number of the item you want. See this thread for the list of which number corresponds with which element.
http://forum.caravelgames.com/viewtopic.php?TopicID=38386
Now every time you call the "
Wait for Item"
function, it will replace the item you instructed it to wait for with the item on the list. Lastly, you'll probably want to clear the _MyScriptF variable so that it doesn't mess with scripts later on in the hold. To do this set it back to -9999. Here is a sample code.
Set Var: _MyScriptF = 35
Label: loop
If...
Wait for Item: floor (coordinates)
GoTo: loop
Else
Set Var: _MyScriptF = -9999
Go to: do a thing
The "
wait for item"
command doesn't actually wait for floor. floor gets replaced by the value of _MyScriptF which is 35, corresponding to Tar. Similarly you can set it to 60 to wait for mud and 76 to wait for gel. Setting _MyScriptF to -9999 at the end clears it so that the next time you use the "
Wait for Item"
command it will actually wait for whatever you select from the menu. I hope this helps, but I would recommend reading through the forum post linked above for more details.
____________________________
Links to neat forum tools that I always have trouble finding:
Click here to view the secret text