Help with Scripting
Posted: Tue Sep 07, 2010 4:20 pm
I'm trying to modify archer01's unit spawning AI script to spawn three units, rep_inf_scorch, rep_inf_fixer and rep_inf_sev when rep_inf_boss spawns. These three units would spawn at the same command post as rep_inf_boss and follow him, but would not spawn if they already are on the battlefield.
For example: rep_inf_boss spawns and the other three spawn around him. rep_inf_boss moves into the battlefield followed by the other three units, but he and rep_inf_fixer are killed by a grenade. rep_inf_boss respawns at another command post, but as rep_inf_scorch and rep_inf_sev already are on the battlefield only rep_inf_fixer spawns with him. rep_inf_scorch and rep_inf sev make their way back to rep_inf_boss, but rep_inf_scorch is killed on the way. rep_inf_boss is soon killed again and this time when he spawns only rep_inf_scorch spawns with him. rep_inf_sev and rep_inf_fixer make their way back to rep_inf_boss.
My script so far (not much good)
The original script:
http://www.gametoast.com/forums/viewtop ... 47#p126047
For example: rep_inf_boss spawns and the other three spawn around him. rep_inf_boss moves into the battlefield followed by the other three units, but he and rep_inf_fixer are killed by a grenade. rep_inf_boss respawns at another command post, but as rep_inf_scorch and rep_inf_sev already are on the battlefield only rep_inf_fixer spawns with him. rep_inf_scorch and rep_inf sev make their way back to rep_inf_boss, but rep_inf_scorch is killed on the way. rep_inf_boss is soon killed again and this time when he spawns only rep_inf_scorch spawns with him. rep_inf_sev and rep_inf_fixer make their way back to rep_inf_boss.
My script so far (not much good)
Hidden/Spoiler:
http://www.gametoast.com/forums/viewtop ... 47#p126047
Lagomorphia wrote:The archer01 script spawns units when a certain weapon is used. What I'm trying to do is replace the weapon use with spawning, which is quite simple. However, as I'm not sure how to get the original working the ability to switch between triggers is useless.
First I need to know how to work the archer01 script, then I'll swap the triggers and, if it doesn't happen anyway, need to prevent duplicates from spawning.
Sorry if that wasn't clear.