Page 1 of 1

Is it possible to have triggers aimed at only one team?

Posted: Fri Jan 23, 2004 7:53 am
by Axion
For instance, would I be able to make a trigger that causes damage to just Axis players?

Posted: Fri Jan 23, 2004 10:09 am
by crunch
Yes, it is.
It would need to be scripted.

name_of_your_thread:

local.player = parm.other
if (local.player.dmteam != "allies")
{
self nottriggerable
Do something
}
wait X
self triggerable

end


In this scenario, the trigger would fire if an Axis touched/used/shot it.
( != is "does not equal") so != "allies" is axis.

Of course, your trigger would have setthread/name_of_your_thread

Posted: Fri Jan 23, 2004 9:43 pm
by Axion
Awesome, thanks for the help. Now, one more question- Would it be possible to spawn said trigger through scripting in a stock map?

Posted: Fri Jan 23, 2004 10:41 pm
by diego
Hey, Great Idea! But can you take it further?

I'd like set up a trigger that only affects players with a specific weapon --- The Shottie.

As a joke, I want to make a small area of my map that is kind of like a "Shottie Free" zone. Anyone going in that area with one will have something bad happen.

Posted: Sat Jan 24, 2004 1:58 am
by Bjarne BZR
Axion wrote:Awesome, thanks for the help. Now, one more question- Would it be possible to spawn said trigger through scripting in a stock map?

Code: Select all

// Create the trigger
local.trigger = spawn trigger_multiple "setthread" "name_of_your_thread"
// Set where it should be
local.trigger.origin = ( 0.0 100.0 0.0 )
// Set the size of it
local.trigger setsize ( -50 -50 -50 ) ( 50 50 50 )

Posted: Sat Jan 24, 2004 2:48 am
by Axion
You guys are fantastic! :D

Posted: Sat Jan 24, 2004 12:18 pm
by Bjarne BZR
Axion wrote:You guys are fantastic! :D
And as if that was not enough: were good looking as well ;)

Just kidding, glad to help.

Posted: Sat Jan 24, 2004 7:38 pm
by Axion
Hahahaha!

I kinda walked right into that one, I suppose...