Announcement: Be excellent to each other.


Caravel Forum : DROD Boards : Bugs : Wait For Event Fuse Burning weirdness
New Topic New Poll Post Reply
Poster Message
Remlin
Level: Master Delver
Rank Points: 181
Registered: 04-28-2005
IP: Logged
icon Wait For Event Fuse Burning weirdness (+3)  
With scripting it can be hard to tell the difference between "this is a bug" and "I don't understand scripting", but... I think this is a bug.

I put down a long length of fuse and a character with this script:
Label top
  If ... 
        Wait for event Fuse burning
     Speech "Fuse burning",Normal,Self,10,.
  If End 
  Wait 0
  Go to top
I expect that speech to trigger every turn from when I start the fuse burning until the last bit of fuse burns out, but it only triggers on the start. I tried again without the if statement:
Label top
  Wait for event Fuse burning
  Speech "Fuse burning",Normal,Self,10,.
  Wait 0
  Go to top
And that one triggers only every second turn. Weird stuff.

[Last edited by Remlin at 03-03-2021 10:56 PM]
03-03-2021 at 10:56 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
skell
Level: Legendary Smitemaster
Avatar
Rank Points: 3734
Registered: 12-28-2004
IP: Logged
icon Re: Wait For Event Fuse Burning weirdness (+1)  
Just going by memory, so someone can correct me if I am wrong but most likely what's happening here is:

1. Fuse burning event is triggered in two cases - immediately when something steps on a fuse and when the fuse burning is processed. The former can happen anywhere during the course of turn, the latter happens only after every monster (including characters) has finished moving and is part of room processing.
2. The first script works on the initial step because of that - on the first turn player triggers the fuse burning event, then the character script runs, then fuse burning is processed. On subsequent turns first the character script runs (and there is no event) and then the fuses are processed.
3. The second script semi works because for "Wait for Event" there is a special kind of processing, where very late in the room processing sequence, any script that is currently stopped and waiting for a Wait for Event to trigger will continue running. I believe all it does though is continue to the next line in the script, and only on the turn after that the speech can trigger.

This is intended behavior, though I understand it's kind of frustrating. I can't think of any workaround at this point.

____________________________
My website | Facebook | Twitter
03-04-2021 at 04:20 PM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts High Scores This architect's holds Quote Reply
New Topic New Poll Post Reply
Caravel Forum : DROD Boards : Bugs : Wait For Event Fuse Burning weirdness
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.