Help ! My script box triggers only once !

Started by felurian, May 10, 2015, 03:42:42 AM

Previous topic - Next topic

felurian

Hi guys !

I've started to play with the level editor of vvvvvv, but here is the thing : the script in a script box only triggers the first time the character walks though it, and doesn't trigger again until the character leaves the room and re-enters.

Is this how it is supposed to be ?
If not, has anyone had the same problem ?

Dav999

That is how it's supposed to work. If you really need to, you can make it repeat without leaving the room, but that requires internal scripting.

felurian

Thanks ! I'm a bit surprised but ok :)

Any idea about how you could make a script box trigger more than once using internal scripting ?

Dav999

Sorry for the late reply.

Like this:



Also make a script called gotoroom, but remove the script box/terminal again.

Code (gotoroom_load) Select
iftrinkets(0,gotoroom)
Code (gotoroom) Select
gotoroom(x,y)
For x and y here, fill in the room coordinates of the room the script is in minus one. So if the editor says (1,1), fill in gotoroom(0,0). Then, make sure there's exactly one blank line below that, so if you keep pressing the down button on your keyboard the cursor should remain on the second line.
Code (mainscript) Select
say
Your main script