adding onDie condiition to spawned monster
Posted: Mon Oct 27, 2014 8:45 pm
Hi guys,
How do I add an "onDie" condition to the monster I just spawned? I'd like to do something like:
function zarchtonBossfight()
spawn("zarchton_ambush", 16, x, y, z, facing, "boss_name")
boss_name.monster:onDie(timer_1.timer:start())
zarchton_bossfight.bossfight:activate()
zarchton_bossfight.bossfight:addMonster(boss_name.monster)
end
function zarchtonSwarm()
spawn("zarchton_swarm_1", 16, xyzfacing "new_boss_name")
new_boss_name.monster:onDie(timer_1.timer:start())
zarchton_bossfight.bossfight:addMonster(new_boss_name.monster)
end
The idea being I could spawn additional zarchtons and add them to the fight as it went on. Also, it needs to be the zarchton_ambush guys cause I want them to animate out of the water.
How do I add an "onDie" condition to the monster I just spawned? I'd like to do something like:
function zarchtonBossfight()
spawn("zarchton_ambush", 16, x, y, z, facing, "boss_name")
boss_name.monster:onDie(timer_1.timer:start())
zarchton_bossfight.bossfight:activate()
zarchton_bossfight.bossfight:addMonster(boss_name.monster)
end
function zarchtonSwarm()
spawn("zarchton_swarm_1", 16, xyzfacing "new_boss_name")
new_boss_name.monster:onDie(timer_1.timer:start())
zarchton_bossfight.bossfight:addMonster(new_boss_name.monster)
end
The idea being I could spawn additional zarchtons and add them to the fight as it went on. Also, it needs to be the zarchton_ambush guys cause I want them to animate out of the water.