local localskillID = 13 function onStartup(self) self:SetVar("bIsDead", false) end function onCollisionPhantom(self, msg) if ( self:GetVar("bIsDead") == true ) then return end local target = msg.objectID local faction = target:GetFaction() -- If a player collided with me, then cast the skill on him if faction and (faction.faction == 1 or faction.faction == 101) then if ( (target:GetImagination().imagination) < (target:GetMaxImagination().imagination) ) then self:PlayFXEffect{effectType = "pickup"} self:CastSkill{skillID = localskillID, optionalTargetID = target} self:Die{ killerID = msg.playerID, killType = "SILENT" } self:SetVar("bIsDead", true) end end end