Page 1 of 1

Special passive for unique

Posted: Wed Jan 23, 2013 1:00 am
by PureQuestion

Code: Select all

on_added_to_level = function(self)
		local DamageType = require "engine.DamageType"
		-- Add a lasting map effect
		game.level.map:addEffect(self,
			self.x, self.y, nil,
			DamageType.PHYSKNOCKBACK, t.getDamage(self, t),
			3,
			5, nil,
			{type="generic_vortex", {radius=e.radius, rm=255, rM=255, gm=180, gM=255, bm=180, bM=255, am=35, aM=90}},
			function(e)
				e.x = e.src.x
				e.y = e.src.y
				if e.src:attr("dead") then [THING GOES HERE]  end
				return true
			end,
			false
		)
	end,
Basically, the above map effect follows the enemy until they die. I want to know how to make it go away when they die. See [THING GOES HERE]

In theory, simply knowing the name of the duration variable would do. Is it dur? duration?

Re: Special passive for unique

Posted: Wed Jan 23, 2013 9:57 pm
by darkgod
dur

Re: Special passive for unique

Posted: Wed Jan 23, 2013 11:47 pm
by aardvark
darkgod wrote:dur
OK, but PureQuestion still wants to know the variable name.

Thank you, I'll be here all week.