KillBox.

den4iccc

Друзья CG
20 Сен 2014
440
1
Проект
Survival in Taiga XE
Вот скрипт. Что не так с ним Кил зона не работает :'(
function OnStartTouch(key)

print(key.activator)
print(key.caller)

killEntity(key.activator)

end

function killEntity(key)

unitName = key:GetUnitName() -- Retrieves the name that the unit has, such as listed in "npc_units_custom.txt"

print("Unit '" .. unitName .. "' has entered the killbox")

if (key:IsOwnedByAnyPlayer() ) then -- Checks to see if the entity is a player controlled unit
print("Is player owned - Ignore")

else
print("Is not owned by player - Terminate")
key:ForceKill(true) -- Kills the unit
end

end


ZA6doNJ.png

fz64uC5.png
 
Последнее редактирование модератором:

doter.ua

Продвинутый
17 Авг 2014
280
5
Вот скрипт. Что не так с ним Кил зона не работает :'(
function OnStartTouch(key)

print(key.activator)
print(key.caller)

killEntity(key.activator)

end

function killEntity(key)

unitName = key:GetUnitName() -- Retrieves the name that the unit has, such as listed in "npc_units_custom.txt"

print("Unit '" .. unitName .. "' has entered the killbox")

if (key:IsOwnedByAnyPlayer() ) then -- Checks to see if the entity is a player controlled unit
print("Is player owned - Ignore")

else
print("Is not owned by player - Terminate")
key:ForceKill(true) -- Kills the unit
end

end

Выбери класс dota_trigger
 
Последнее редактирование модератором:
Реклама: