Credge
08-29-2009, 03:16 AM
Or really, any other map that has them. I'm using the aardvark LUA for a basis of my maps LUA because it has things pretty close to what I want from my map anyway.
However, I'm having some problems with getting the kill lasers to work. From the Aardvark LUA:
-----------------------------------------------------------------------------
-- aardvark lasers and respawn shields
-----------------------------------------------------------------------------
KILL_KILL_KILL = trigger_ff_script:new({ team = Team.kUnassigned })
lasers_KILL_KILL_KILL = trigger_ff_script:new({ team = Team.kUnassigned })
function KILL_KILL_KILL:allowed( activator )
local player = CastToPlayer( activator )
if player then
if player:GetTeamId() == self.team then
return EVENT_ALLOWED
end
end
return EVENT_DISALLOWED
end
function lasers_KILL_KILL_KILL:allowed( activator )
local player = CastToPlayer( activator )
if player then
if player:GetTeamId() == self.team then
if self.team == Team.kBlue then
if redsecstatus == 1 then
return EVENT_ALLOWED
end
end
if self.team == Team.kRed then
if bluesecstatus == 1 then
return EVENT_ALLOWED
end
end
end
end
return EVENT_DISALLOWED
end
blue_slayer = KILL_KILL_KILL:new({ team = Team.kBlue })
red_slayer = KILL_KILL_KILL:new({ team = Team.kRed })
sec_blue_slayer = lasers_KILL_KILL_KILL:new({ team = Team.kBlue })
sec_red_slayer = lasers_KILL_KILL_KILL:new({ team = Team.kRed })
I'm not entirely sure what I need to name my entity to get this to work. Any help?
However, I'm having some problems with getting the kill lasers to work. From the Aardvark LUA:
-----------------------------------------------------------------------------
-- aardvark lasers and respawn shields
-----------------------------------------------------------------------------
KILL_KILL_KILL = trigger_ff_script:new({ team = Team.kUnassigned })
lasers_KILL_KILL_KILL = trigger_ff_script:new({ team = Team.kUnassigned })
function KILL_KILL_KILL:allowed( activator )
local player = CastToPlayer( activator )
if player then
if player:GetTeamId() == self.team then
return EVENT_ALLOWED
end
end
return EVENT_DISALLOWED
end
function lasers_KILL_KILL_KILL:allowed( activator )
local player = CastToPlayer( activator )
if player then
if player:GetTeamId() == self.team then
if self.team == Team.kBlue then
if redsecstatus == 1 then
return EVENT_ALLOWED
end
end
if self.team == Team.kRed then
if bluesecstatus == 1 then
return EVENT_ALLOWED
end
end
end
end
return EVENT_DISALLOWED
end
blue_slayer = KILL_KILL_KILL:new({ team = Team.kBlue })
red_slayer = KILL_KILL_KILL:new({ team = Team.kRed })
sec_blue_slayer = lasers_KILL_KILL_KILL:new({ team = Team.kBlue })
sec_red_slayer = lasers_KILL_KILL_KILL:new({ team = Team.kRed })
I'm not entirely sure what I need to name my entity to get this to work. Any help?