View Single Post
Old 02-25-2008, 02:19 AM   #5
ensiform
Time Lord, Doctor
Beta Tester
 
ensiform's Avatar
 
Join Date: Dec 2007
Location: The TARDIS
Class/Position: Engineer
Gametype: CTF
Posts Rated Helpful 1 Times
Quote:
Originally Posted by GambiT
ok, heres a task. this is for rock2.

i have 2 triggers(for each team), one for wo entry(call it "wolight"[red/bluewolight]) and one for yard entry spotlight(call it "yardlight"[red/blueyardlight]). heres the thing, when a "disguised" enemy spy goes through the trigger i do NOT want it to light up, but for all other enemies i do.
From base_teamplay... involving respawn door triggers:

Code:
function respawndoor:allowed( allowed_entity )
	if IsPlayer( allowed_entity ) then
		
		local player = CastToPlayer( allowed_entity )
		
		if player:GetTeamId() == self.team then
			return EVENT_ALLOWED
		end
		
		if self.allowdisguised then
			if player:IsDisguised() and player:GetDisguisedTeam() == self.team then
				return EVENT_ALLOWED
			end
		end
	end
	return EVENT_DISALLOWED
end
So maybe... trigger_ff_script that with an ontrigger callback that looks for enemies (and also do a check for disguised spies that match the allied team) and then have it fail same as if regular allies touch it
ensiform is offline   Reply With Quote