Announcement: Why not try our official idea generator for inspiration when making puzzles?


Caravel Forum : DROD Boards : Architecture : Scripting tar
New Topic New Poll Post Reply
Poster Message
jokokoe
Level: Delver
Avatar
Rank Points: 71
Registered: 02-19-2010
IP: Logged
icon Scripting tar (0)  
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 !

____________________________
My Holds :

Architecture Salon
Do it Again
11-16-2015 at 07:06 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
Insoluble
Level: Smitemaster
Avatar
Rank Points: 1638
Registered: 09-04-2014
IP: Logged
icon Re: Scripting tar (+2)  
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

11-16-2015 at 09:32 PM
View Profile Send Private Message to User Send Email to User Show all user's posts This architect's holds Quote Reply
jokokoe
Level: Delver
Avatar
Rank Points: 71
Registered: 02-19-2010
IP: Logged
icon Re: Scripting tar (0)  
Wonderful ! I'm gonna need some time to script everything but it's working great, thank you :D:D:D

One last thing that may look stupid but can I copy a script from a character and copy it to another ?

edit : nevermind , CTRL C+V is only working on a character , i needed to use CTRL SHIFT +B ...

____________________________
My Holds :

Architecture Salon
Do it Again

[Last edited by jokokoe at 11-16-2015 10:46 PM]
11-16-2015 at 10:28 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
New Topic New Poll Post Reply
Caravel Forum : DROD Boards : Architecture : Scripting tar
Surf To:


Forum Rules:
Can I post a new topic? No
Can I reply? No
Can I read? Yes
HTML Enabled? No
UBBC Enabled? Yes
Words Filter Enable? No

Contact Us | CaravelGames.com

Powered by: tForum tForumHacks Edition b0.98.8
Originally created by Toan Huynh (Copyright © 2000)
Enhanced by the tForumHacks team and the Caravel team.