What's the best way of changin a character location in a town?

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: What's the best way of changin a character location in a town?
Warrior
Member # 2838
Profile #0
I want that after certain event the location of a character in a town is changed. For example, there is a townperson that is jailed and after you proove he is innocent he returns to his home. How do I make this happen in the editor?

I was thinking that the best would be to make the second character belong to a hidden group and put a script on the init town state that after certain flag is set, erase the first one and makes the second one appear.

--------------------
…../|,-‘`¯¯`\(o)_\,----,,,_………
…( `\(o),,_/` ¯ : o : :: o`-, … I'm under your bed.
Posts: 118 | Registered: Wednesday, April 2 2003 08:00
Off With Their Heads
Member # 4045
Profile Homepage #1
That's probably the best way to do it.

The other way that comes to mind is to use relocate_character, but then you may have trouble with the character thinking that its starting location is elsewhere and trying to return to it. You'd have to give it a special script in order for that to work, so your best bet is probably exactly what you described.

EDIT: Bah, the call is relocate_character, not relocate_char.

[ Wednesday, August 04, 2004 12:11: Message edited by: Kelandon ]

--------------------
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
Warrior
Member # 4202
Profile Homepage #2
Or if you want to get into complicated creature scripts, you could make the character actually walk back to his home, rather than "teleporting". (Unless he's a powerful wizard, of course :P )

--------------------
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
Agent
Member # 4506
Profile Homepage #3
For Isaacs, you'll probably want to use the RELOCATE_CHARACTER(character number,x location, y location) call. It's somewhere in the scripts. (cut scenes section (that's for teleporting and such. For anything else... SORRY!)

- Archmagi Micael

--------------------
"You dare Trifle with Avernum?" ~ Erika the Archmage
--------------------
My Scenarios:
Undead Valley : A small Undead problem, what could possibly go wrong?
--------------------
Richard Black - PROOF of his existance (the Infernal one's website).
--------------------
MY FORUM! Randomosity at it's highest! :)
Posts: 1370 | Registered: Thursday, June 10 2004 07:00
Off With Their Heads
Member # 4045
Profile Homepage #4
Nice job saying exactly what I just said, Micael. :P

--------------------
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