Page 1 of 1
Linking "ambush" function to weapons
Posted: Thu Sep 28, 2006 6:17 pm
by somen00b
Can it be done? I would like it for my 2nd map
RE: Linking "ambush" function to weapons
Posted: Thu Sep 28, 2006 8:27 pm
by [RDH]Zerted
What do you mean? Every time a weapon is fired, an ambush occurs? Something like a detpack, but instead of exploding it releases units?
Keep in mind we only know how to spawn units on paths. We don't know how to create paths ingame (may be possible, but not yet attempted), so the location of any units spawning has to be defined in ZeroEdit (or by editing the world text files before munging).
Posted: Thu Sep 28, 2006 9:09 pm
by somen00b
What I idealy want is every time you fire a certain weapon it triggers preset ambushes, I am following the heros spawning troops thread. I want something like
onweaponfire (all_inf_ghost_caller)
ambush (ambush function stuff here)
if you can manage it, a team filter so an ambush only occurs if the empire owns a certain cp
something like
onweaponfire (all_inf_ghost_caller)
if cp10team=IMP then
ambush (ambush function stuff here)
though it's icing on the cake and I might not include it
Posted: Thu Sep 28, 2006 9:55 pm
by [RDH]Zerted
Yes thats possible. There is no OnWeaponFire. Instead you can use CharacterDispenseControllable. When a player fires (drops) this weapon, you can do anything in the event response that you can normally do in the Lua.
Posted: Thu Sep 28, 2006 10:25 pm
by xwingguy
you can also use OnCharacterDispensePowerup
Posted: Fri Sep 29, 2006 8:02 pm
by somen00b
could you write that out in copy and pasteable format? I know no lua
