The Dink Network

Reply to Re: Help with complicated script

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
October 10th 2014, 05:53 AM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
This is true. kill_this_task() kills a script instance. Whenever you blah(), that code is run in a new script instance. I think the if (&myhp < 0) block would do great just after handling the choices in void fight.

For a similar reason, I see that in void strike, you goto enemy. I suggest using the simple return, here's why:

Script instance 1 encounters the line "strike()", creates script instance 2, and waits for it to get back.
Script instance 2 searches for "void strike", finds it, runs it.
... encounters the line "goto enemy".
... searches for "enemy:", finds it, runs it.
... encounters "goto command".
... searches for "command:", finds it, runs it.
... encounters the line "strike()", creates instance 3, and waits for it to get back.
Script instance 3 searches for "void strike", finds it, runs it.
etc.

I expect an epic combat of lots of rounds to crash the game, because you'll run into the script limit. With return, it'll be script instance 1 that wakes up, hopefully skips the other &result checks, and proceeds at enemy:. I say "hopefully", because &result may change if whatever choice you made results in another choice menu.