Announcement: Be excellent to each other.


Caravel Forum : DROD Boards : Bugs : If... Wait for Event bugs
New Topic New Poll Post Reply
Poster Message
RoboBob3000
Level: Smitemaster
Avatar
Rank Points: 1978
Registered: 10-23-2003
IP: Logged
icon If... Wait for Event bugs (0)  
I was having issues playing with the scripter, and I've either uncovered bugs or exposed my lack of knowledge of the updated system. I created a character with the following script:

Label "Loop"
Wait 0 turns
If...
Wait for event (event under test)
Speech "pass"
If End
Go to "Loop"



I tested nearly every one of the possible events I could use in this script. The following events did not register a pass:

All tarstuff removed
Bomb exploded
Briars grew
Double placed (all three types)
Gel baby formed (by cut and by growth)
Light toggled (on and off by a character programmed to do so)
Mud baby formed (by cut and by growth)
Object activates orb (by player sword, character activation, bomb, and guard sword. Oddly enough, a fegundo explosion works though)
Orb damaged (both cracked and broken orbs)
Player frozen by gaze
Pressure plate released
Room conquered
Tar baby formed (by cut and by growth)
Tar destroyed (by striking regular tar and by striking momma)



Other notes I took:

Tar destroyed: Why no equivalent for mud or gel?
Tunnel (this one works, but needs a more descriptive name)
Object built (not tested because I couldn't yet figure it out)
Rattlesnake tail: Why no equivalent for adder?
Ash turns into fegundo: Better renamed "Fegundo rises from ash" for clarity and so it will be next to the other fegundo event alphabetically



I don't have this all saved in a sample hold, but I can demonstrate any of these upon request. Hopefully it's my lack of knowledge on the scripting, because if these are bugs, then "if" is looking pretty iffy.

____________________________
http://beepsandbloops.wordpress.com/
04-08-2007 at 10:58 AM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
trick
Level: Legendary Smitemaster
Rank Points: 2580
Registered: 04-12-2003
IP: Logged
icon Re: If... Wait for Event bugs (0)  
Label "Loop"
Wait 0 turns
If...
Wait for event (event under test)
Speech "pass"
If End
Go to "Loop"
That script has an infinite loop, since if...wait doesn't block; it just checks if the event being tested happened the current turn. You should replace Wait 0 with Wait 1 to make the script wait a turn before it checks again (and probably move it to the bottom of the loop, so the first turn is also checked).

04-08-2007 at 11:23 AM
View Profile Send Private Message to User Send Email to User Show all user's posts Quote Reply
starwed
Level: Delver
Rank Points: 49
Registered: 12-16-2006
IP: Logged
icon Re: If... Wait for Event bugs (+1)  
If it is an infinite loop, I think that's also a bug, because in this thread mrimer coded thusly:
Wait 0           //this halts until next turn in 2.0.15+.
                 //Before 2.0.15, you must use "Wait 1"

04-08-2007 at 11:57 AM
View Profile Send Private Message to User Send Email to User Show all user's posts Quote Reply
RoboBob3000
Level: Smitemaster
Avatar
Rank Points: 1978
Registered: 10-23-2003
IP: Logged
icon Re: If... Wait for Event bugs (0)  
Starwed is correct in regards to the way I approached the problem. Also, I made sure to trigger the events a few moves after starting play.

Even though I didn't test them all again, this behavior seems to reproduce with no regard to whether or not the wait is at the start or end of the loop. It also doesn't seem to matter if it's a 0 or 1.

____________________________
http://beepsandbloops.wordpress.com/
04-08-2007 at 06:50 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
schep
Level: Smitemaster
Avatar
Rank Points: 865
Registered: 03-01-2005
IP: Logged
icon Re: If... Wait for Event bugs (+1)  
Note that in 2.0, events which happen after character scripts run, including tarstuff cutting/growth and fuse-lit bombs, cannot be tested by "If... Goto". I'm guessing this is still an issue with "If...", which explains some of these. But the Orb Damaged one seems like it ought to happen on the player's turn. And note that the player striking an orb counts as a "Player strikes orb", not "Object strikes orb" event.

But in 3.0 there should be a good workaround for detecting late events: Make another character just to "Wait for Event" (without an If) and then set a variable which your other character can test.

[Last edited by schep at 04-11-2007 02:35 PM]
04-11-2007 at 02:34 PM
View Profile Send Private Message to User Send Email to User Show all user's posts This architect's holds Quote Reply
mrimer
Level: Legendary Smitemaster
Avatar
Rank Points: 5065
Registered: 02-04-2003
IP: Logged
icon Re: If... Wait for Event bugs (0)  
Fixed the "Orb damaged" event not firing in the 4.0 engine.

____________________________
Gandalf? Yes... That's what they used to call me.
Gandalf the Grey. That was my name.
I am Gandalf the White.
And I come back to you now at the turn of the tide.
12-10-2011 at 04:30 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
New Topic New Poll Post Reply
Caravel Forum : DROD Boards : Bugs : If... Wait for Event bugs
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.