roriscrave
Advanced OT User
- Joined
- Dec 7, 2011
- Messages
- 1,188
- Solutions
- 34
- Reaction score
- 201
Hi, i'm using tfs 1.2 have a boss in a game, and i need all players who dealt at least 1 damage are teleported to a position.
but its only teleporting 1 player, not everyone who attacks the boss, would i have to use another function?
i"m tryng to use something like this:
but its only teleporting 1 player, not everyone who attacks the boss, would i have to use another function?
i"m tryng to use something like this:
Lua:
local posFinal = Position(1000,1000,7)
function onDeath(creature, corpse, killer, mostDamageKiller, lastHitUnjustified, mostDamageUnjustified)
for cid, damage in pairs(creature:getDamageMap()) do
local killer = Creature(cid)
if killer:isPlayer() then
killer:teleportTo(posFinal)
end
end
return true
end