local localskillID = 13 local ImaginationPickup = 60 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() local isfaction = msg.senderID:GetFaction().faction local currentImag = target:VehicleImaginationGetCurrent{}.iImagination local maxImag = target:VehicleImaginationGetMax{}.iMaxImagination --print("CurrentImag="..tostring(currentImag)..", max="..tostring(maxImag)) if isfaction == 113 then if ( currentImag < maxImag ) then self:PlayFXEffect{effectType = "pickup"} target:PlayFXEffect{name = "bouncer", effectID = 194, effectType = "onbounce"} target:PlayFXEffect{name = "energy_orb", effectID = 1007, effectType = "cast"} target:VehicleImaginationSetCurrent{bIgnoreMax = false, iImagination = currentImag + ImaginationPickup } target:RacingPlayerClientEvent{ clientEventType="POWERUP_IMAGINATION", playerID=msg.senderID, objectID=self } self:Die{ killerID = msg.senderID, killType = "SILENT" } self:SetVar("bIsDead", true) end end end