Garrulous Glaahk Isaac Posted June 2, 2004 Share Posted June 2, 2004 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? Link to comment Share on other sites More sharing options...
Magnificent Ornk Drakefyre Posted June 2, 2004 Share Posted June 2, 2004 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? Link to comment Share on other sites More sharing options...
Garrulous Glaahk Isaac Posted June 2, 2004 Author Share Posted June 2, 2004 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. Link to comment Share on other sites More sharing options...
Garrulous Glaahk spyderbytes Posted June 2, 2004 Share Posted June 2, 2004 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. Link to comment Share on other sites More sharing options...
Magnificent Ornk Kelandon Posted June 2, 2004 Share Posted June 2, 2004 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. Link to comment Share on other sites More sharing options...
Garrulous Glaahk spyderbytes Posted June 3, 2004 Share Posted June 3, 2004 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. Link to comment Share on other sites More sharing options...
Garrulous Glaahk Isaac Posted June 3, 2004 Author Share Posted June 3, 2004 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. Link to comment Share on other sites More sharing options...
Magnificent Ornk Drakefyre Posted June 3, 2004 Share Posted June 3, 2004 You can't move to a new town in combat mode. Link to comment Share on other sites More sharing options...
Garrulous Glaahk Isaac Posted June 3, 2004 Author Share Posted June 3, 2004 Yes you can, in Blades of Avernum. Link to comment Share on other sites More sharing options...
Recommended Posts