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.
adding onDie condiition to spawned monster
-
- Posts: 28
- Joined: Tue Oct 21, 2014 5:51 am
Re: adding onDie condiition to spawned monster
:addConnector(event, target, action)
The way I find a ton of stuff is to add, checkbox, toggle everything in all objects then take a look in the dungeons.lua for the syntax.
The way I find a ton of stuff is to add, checkbox, toggle everything in all objects then take a look in the dungeons.lua for the syntax.
-
- Posts: 28
- Joined: Tue Oct 21, 2014 5:51 am
Re: adding onDie condiition to spawned monster
it works!! thanks (
function zarchtonBossfight()
spawn("zarchton_ambush", 16, 24, 9, 3, 0, "swarm1")
swarm1.monster:addConnector("onDie", "alarm_timer_1", "start")
end
function zarchtonBossfight()
spawn("zarchton_ambush", 16, 24, 9, 3, 0, "swarm1")
swarm1.monster:addConnector("onDie", "alarm_timer_1", "start")
end