- Documentation
- Server functions
- getProjectileTarget
Function
getProjectileTarget
Returns the target of a homing projectile.
Syntax
element getProjectileTarget(projectile theProjectile)Arguments
theProjectileprojectile- The projectile.
Returns
The target, or false when there is none.
Example
addEventHandler("onProjectileCreation", root, function()
local target = getProjectileTarget(source)
if target then outputDebugString("Cel: " .. getElementType(target)) end
end)