Who triggered this script?

Error message

Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in drupal_get_feeds() (line 394 of /var/www/pied-piper.ermarian.net/includes/common.inc).
AuthorTopic: Who triggered this script?
Warrior
Member # 4202
Profile Homepage #0
Is there any way I can find out, when the party is in combat and one of the party members steps on a special rectangle, which person did it?

[ Wednesday, June 02, 2004 00:30: Message edited by: Isaac ]

--------------------
Creator of the 3D Blades of Avernum Editor for Mac. Get it at Ingenious Isaac's Illusion, my web page. Better yet, get Battle for Wesnoth, a wonderful free TBS game.
Posts: 192 | Registered: Sunday, April 4 2004 08:00
Triad Mage
Member # 7
Profile Homepage #1
It's early, so I'm only thinking in terms of brute force, but you can check for a person standing on each space of the rectangle. Is there a combat block involved? Should there be?

--------------------
"At times discretion should be thrown aside, and with the foolish we should play the fool." - Menander
====
Drakefyre's Demesne - Happy Happy Joy Joy
Encyclopedia Ermariana - Trapped in the Closet
====
You can take my Mac when you pry my cold, dead fingers off the mouse!
Posts: 9436 | Registered: Wednesday, September 19 2001 07:00
Warrior
Member # 4202
Profile Homepage #2
quote:
Originally written by Drakefyre:

...you can check for a person standing on each space of the rectangle.
The script is triggered before the movement actually happens, so that won't work. I can't check for characters next to the rectangle either because there might be two of them and I won't know which one it is.

quote:
Is there a combat block involved? Should there be?
No.

--------------------
Creator of the 3D Blades of Avernum Editor for Mac. Get it at Ingenious Isaac's Illusion, my web page. Better yet, get Battle for Wesnoth, a wonderful free TBS game.
Posts: 192 | Registered: Sunday, April 4 2004 08:00
Shock Trooper
Member # 4180
Profile #3
Will the char_who_activated_script() or get_char_who_stepped_on() calls not work for what you're doing?

EDIT: Mis-remembered what one of the calls was. :)

[ Wednesday, June 02, 2004 14:07: Message edited by: spyderbytes ]

--------------------
-spyderbytes
Posts: 200 | Registered: Wednesday, March 31 2004 08:00
Off With Their Heads
Member # 4045
Profile Homepage #4
Those aren't general enough, I believe. One is for custom terrain with special property 8 and the other is for custom terrain scripts.

I'm not quite sure how one would do this. It seems simple enough, but I don't know.

--------------------
Arancaytar: Every time you ask people to compare TM and Kel, you endanger the poor, fluffy kittens.
Smoo: Get ready to face the walls!
Ephesos: In conclusion, yarr.

Kelandon's Pink and Pretty Page!!: the authorized location for all things by me
The Archive of all released BoE scenarios ever
Posts: 7968 | Registered: Saturday, February 28 2004 08:00
Shock Trooper
Member # 4180
Profile #5
Welp, then, the EASIEST way to do it would be to do what needs to be done from a terrain script, if possible, rather than a special encounter rectangle. There are a couple of calls (most notably move_to_new_town()) that won't work except from a special encounter, however.

If that won't work, the next easiest might be to set a SDF, and check it at the beginning of the next round (after the char has actually moved into the spot). Then you can just check the loc of party members to see if they match up.

Otherwise, I'm not sure what I'd try, but I might still think of something. :)

--------------------
-spyderbytes
Posts: 200 | Registered: Wednesday, March 31 2004 08:00
Warrior
Member # 4202
Profile Homepage #6
Thank you, I wasn't remembering those. The circumstance is very strange. If I had needed to know who triggered it in combat and use move_to_new_town at the same time, it would require a terrain script. Apparently when there is a special rectangle, terrain script, and terrain special property script all on the same space, the trigger order is terrain script, then special rectangle, then terrain special property script. I could store who did it in a flag, during the terrain script, and use that in the special rectangle script. Luckily my circumstance didn't require that level of complexity.

--------------------
Creator of the 3D Blades of Avernum Editor for Mac. Get it at Ingenious Isaac's Illusion, my web page. Better yet, get Battle for Wesnoth, a wonderful free TBS game.
Posts: 192 | Registered: Sunday, April 4 2004 08:00
Triad Mage
Member # 7
Profile Homepage #7
You can't move to a new town in combat mode.

--------------------
"At times discretion should be thrown aside, and with the foolish we should play the fool." - Menander
====
Drakefyre's Demesne - Happy Happy Joy Joy
Encyclopedia Ermariana - Trapped in the Closet
====
You can take my Mac when you pry my cold, dead fingers off the mouse!
Posts: 9436 | Registered: Wednesday, September 19 2001 07:00
Warrior
Member # 4202
Profile Homepage #8
Yes you can, in Blades of Avernum.

--------------------
Creator of the 3D Blades of Avernum Editor for Mac. Get it at Ingenious Isaac's Illusion, my web page. Better yet, get Battle for Wesnoth, a wonderful free TBS game.
Posts: 192 | Registered: Sunday, April 4 2004 08:00