On/Off a lamp when the "enemy" enter in perimeter

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
User avatar
mcunha98
Lieutenant Colonel
Posts: 384
Joined: Sat Jan 17, 2004 1:52 am
Location: Brasil
Contact:

On/Off a lamp when the "enemy" enter in perimeter

Post by mcunha98 »

In The Hunt map when we pass a specific region, a trigger show the message to axis about "Allies" entering in perimter of objective.

Into a Team DeathMatch map is possible create this process using two triggers, to alert for each side (allied/axis) it the enemy team enter in perimeter ?
User avatar
Axion
Major General
Posts: 683
Joined: Mon Sep 29, 2003 5:14 am
Location: Northern California
Contact:

Post by Axion »

Just place a trigger multiple and give it the following key/value:

setthread - allied_perimeter

In your script, you would add this:

Code: Select all

allied_perimeter:
	
	 local.player = parm.other
	 if ( (local.player.dmteam != "axis") || (level.alliedperimeter_breached == 1) )
		end
		
	 iprintlnbold "The Axis have breached the perimeter!"
	 level.alliedperimeter_breached = 1 
end
"The work of a thousand years is nothing but rubble."
- Dr. Carl Goerdeler (1943)
Visit my mapping site: http://www.freewebs.com/axion9
Image
User avatar
mcunha98
Lieutenant Colonel
Posts: 384
Joined: Sat Jan 17, 2004 1:52 am
Location: Brasil
Contact:

Post by mcunha98 »

Axion wrote:Just place a trigger multiple and give it the following key/value:

setthread - allied_perimeter

In your script, you would add this:

Code: Select all

allied_perimeter:
	
	 local.player = parm.other
	 if ( (local.player.dmteam != "axis") || (level.alliedperimeter_breached == 1) )
		end
		
	 iprintlnbold "The Axis have breached the perimeter!"
	 level.alliedperimeter_breached = 1 
end
User avatar
mcunha98
Lieutenant Colonel
Posts: 384
Joined: Sat Jan 17, 2004 1:52 am
Location: Brasil
Contact:

Post by mcunha98 »

Axion wrote:Just place a trigger multiple and give it the following key/value:

setthread - allied_perimeter

In your script, you would add this:

Code: Select all

allied_perimeter:
	
	 local.player = parm.other
	 if ( (local.player.dmteam != "axis") || (level.alliedperimeter_breached == 1) )
		end
		
	 iprintlnbold "The Axis have breached the perimeter!"
	 level.alliedperimeter_breached = 1 
end
Ok, but if per example i cant play a sound file, like alarm ???
What is the operator to play sound (i know the loopsound)
agentmad007
Brigadier General
Posts: 570
Joined: Tue Feb 24, 2004 3:52 pm

Post by agentmad007 »

entity loopsound alias = loop the sound
entity stoploopsound = stop the sound to loop

entity playsound alias = play the sound once
Deadly and slient.
Post Reply