It seems the spawn_character command has not been updated to take advantage of the label capability, giving an error when the syntax specifies a label. Has anyone found a way to get around this, and manipulate characters via labels, at script time?
It seems the spawn_character command has not been updated to take advantage of the label capability, giving an error when the syntax specifies a label. Has anyone found a way to get around this, and manipulate characters via labels, at script time?
Here's the thing though, it doesn't even bring back characters disabled through send_character_off_map. If you use that command on a character e.g. "Bob", and then spawn_character "Bob", it will spawn a new character rather than bringing back the old one first.
Maybe my syntax is wrong, what's the proper syntax for sending a char offmap and then respawning them?
I don't know but:
---------------------------------------------------
Identifier: reposition_character
Parameters: character, x, y
Description: Snap the character to a position
Sample use: reposition_character Gaius Maximus, 14, 53
Class: REPOSITION_CHARACTER
Implemented: Yes
Author: Guy
---------------------------------------------------
Yeah I went that route instead.
I'd imagine it's the only route![]()
The Britannia campaign script shows how to send prince Edward off map and then respawn him (if he goes on crusade). However when I tried to send another factions character off map and bring him back he would become a "zombie". You can send him off map but his portrait goes black and white and on the tree it says "Died in battle 0AD". He can be used as any other general except he retains the black and white portrait.
James had this problem ages ago but thought it was because he had "messed up my mod folder". Fixing this has been on my "to do" list for over 2 years!
Reposition_character is a work-around if you put him on an impassable tile instead of sending him off map.
Last edited by The Bruce; January 27, 2011 at 10:36 PM.
Yeah that's the solution I ended up with. The requisite characters, with their labels (which is the most important thing!) are generated in descr_strat.txt.
Spawn_character is not able to generate characters with labels (unlike spawn_army), nor can you send off-map and recreate.
So we use the fact that it's possible to generate with labels in descr_strat.txt, create all the necessary characters there, and then reposition them in, on a need-to-know basis.