Trigger detect pass

If you're looking for mapping help or you reckon you're a mapping guru, post your questions / solutions here

Moderator: Moderators

Post Reply
Almogaver
Lance Corporal
Posts: 12
Joined: Mon Feb 16, 2004 2:52 pm

Trigger detect pass

Post by Almogaver »

I need make a trigger that detects the step of the axis as how The Hunt at the allieds :D
User avatar
Deutsche Dogge
First Lieutenant
Posts: 183
Joined: Wed May 07, 2003 11:50 pm
Location: Quebec
Contact:

Post by Deutsche Dogge »

you sure didn't search at all...
Image
Click sig to visit the alternation modding community
User avatar
MPowell1944
Moderator
Posts: 287
Joined: Thu Jan 09, 2003 7:06 am
Location: Woodstock, GA
Contact:

Post by MPowell1944 »

Create a trigger_once with a key of setthread and a value of axis_arrived.

Now, in your mapscript, call the following thread. Copy and paste the thread into your mapscript.

Code: Select all

axis_arrived:

local.player = parm.other
if(local.player.dmteam == "axis")
{
iprintlnbold "The Axis have breached the perimeter!"
}

end
This uses the same thing as the Allied trigger on the Hunt. You can call the thread what you want, but I just used axis_arrived as an example.
Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Post by Rookie One.pl »

Nah, nah, nah, what if the first player to enter the trigger is in allies? ;)
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
User avatar
MPowell1944
Moderator
Posts: 287
Joined: Thu Jan 09, 2003 7:06 am
Location: Woodstock, GA
Contact:

Post by MPowell1944 »

Then nothing happens. It only reacts to Axis, which is what you want.
User avatar
Deutsche Dogge
First Lieutenant
Posts: 183
Joined: Wed May 07, 2003 11:50 pm
Location: Quebec
Contact:

Post by Deutsche Dogge »

trigger_once can get activated many times? (i never used them)
Image
Click sig to visit the alternation modding community
Master-Of-Fungus-Foo-D
Muffin Man
Posts: 1544
Joined: Tue Jan 27, 2004 12:33 am
Location: cali, United States

Post by Master-Of-Fungus-Foo-D »

its called a trigger_once for a reason ;)
Image
The Fungus Theme song!!!

Code: Select all

while (local.player istouching self)
Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Post by Rookie One.pl »

Exactly, Fungus. :)

Powell, the trigger will execute once, no matter what player enters it.
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
Master-Of-Fungus-Foo-D
Muffin Man
Posts: 1544
Joined: Tue Jan 27, 2004 12:33 am
Location: cali, United States

Post by Master-Of-Fungus-Foo-D »

Okay then just change to a trig multiple and make your script like this:

Code: Select all

axis_arrived:
if (level.axisbreached != 1 )
level.axisbreached = 1
local.player = parm.other
if(local.player.dmteam == "axis")
{
iprintlnbold "The Axis have breached the perimeter!"
}

end
Image
The Fungus Theme song!!!

Code: Select all

while (local.player istouching self)
User avatar
Deutsche Dogge
First Lieutenant
Posts: 183
Joined: Wed May 07, 2003 11:50 pm
Location: Quebec
Contact:

Post by Deutsche Dogge »

Master-Of-Fungus-Foo-D wrote:Okay then just change to a trig multiple and make your script like this:

Code: Select all

axis_arrived:
if (level.axisbreached != 1 )
level.axisbreached = 1
local.player = parm.other
if(local.player.dmteam == "axis")
{
iprintlnbold "The Axis have breached the perimeter!"
}

end
Wrong, if the trigger can be activated only once, any player will trigger it as the trigger itself doesn,t check the dmteam of the player. So i guess a trigger_multiple should be used with this code:

Code: Select all

axis_arrived:
if(level.axisbreached != 1 )
{
    local.player = parm.other
    if(local.player.dmteam == "axis")
    {
        level.axisbreached = 1
        iprintlnbold "The Axis have breached the perimeter!"
    }
}
end
This way, any player triggers it but level.axisbreached is set only when the first axis triggers it, the subsequent triggering has no effect.
Image
Click sig to visit the alternation modding community
Post Reply