Page 1 of 1
Escape obj multiplayer?
Posted: Thu Jul 03, 2003 5:42 am
by Trinculo
ok guys i dont know if this has been done or not and yes i have done a search before posting

I want to do a recreation of a map from America's Army, the one i want to do is the Bridge one, where one team has to make their way accross the bridge and get to the end of the road, i want to recreate this obj in mohaa. I'm guessing i need a trigger_multiple at the exit zone and in scripting tell it not to do anything for the other team.
So could you guys help me out a little, i can make simple scripts like light switches and such but trying to work this one out made my head hurt
Thanks in advance

Posted: Thu Jul 03, 2003 12:11 pm
by Bjarne BZR
Shooting from the hip here:
Make a trigger_multiple brush around the escape area. Give it
targetname /
escape
Code: Select all
goal_reached:
while(1) {
$escape waittill trigger
if(parm.other.dmteam == allies) { // parm.other is the triggerer
iprintlnbold_noloc "The allies have escaped!"
teamwin allies
break // out of while loop
}
waitframe // "CPU protection"
}
end
Posted: Thu Jul 03, 2003 3:38 pm
by TheShiznaeSpe
This should work also:
main:
level waittill prespawn
thread axis_win_timer
level waittill spawn
level waittill roundstart // comment out to test
level.dmrespawning = 0 // 1 or 0
level.dmroundlimit = 10 // round time limit in minutes
level.clockside = axis // set to axis, allies, kills, or draw
$win_trigger waitthread allied_trigger
thread allies_win_allied_trigger
end
allied_trigger:
while(1)
{
self waittill trigger
local.triggerer = parm.other
if(local.triggerer.dmteam == "allies")
break
wait 0.1
}
end
allies_win_allied_trigger:
iprintlnbold_noloc "The Allies have escaped!"
teamwin allies
end
axis_win_timer:
level waittill axiswin
iprintlnbold_noloc "That's a winner!"
end
Posted: Thu Jul 03, 2003 7:23 pm
by Desert Eagle
It should work. I am attempting the same thing in my snowy escape map. I have the allies starting unarmed (they will have to find weapons)
To make it a little more difficult I am attmepting to place the allied meeting place (where 5 allies must get to, to win) to be random. Similar to the Hunt where the flak is in different locations near the church.
This way the axis could not camp the meeting point and gun down the allies.
So far I have had some success.
Posted: Thu Jul 03, 2003 11:47 pm
by nuggets
sorry
TheShiznaeSpe, that script will automatically give the allies the victory at the top you have
thread allies_win_allied_trigger
and all that trigger does is
print a line and give allies victory

Posted: Fri Jul 04, 2003 10:34 pm
by TheShiznaeSpe
ALAS!
$win_trigger
waitthread allied_trigger
thread allies_win_allied_trigger
won't this mean that when the win_trigger is pressed, the script waits until the allied_trigger thread is finished to move on?
so if:
Code: Select all
allied_trigger:
while(1)
{
self waittill trigger
local.triggerer = parm.other
if(local.triggerer.dmteam == "allies")
break
wait 0.1
}
end
doesn't happen, the script won't proceed
Posted: Fri Jul 04, 2003 11:48 pm
by nuggets
lol, sorry
don't know what i was thinking then, i missed that entire line
sorry

Posted: Sat Jul 05, 2003 12:08 pm
by TheShiznaeSpe
lol np
