Page 1 of 1
Win for Allies or Axis
Posted: Sun Jul 18, 2004 11:54 am
by Dani
I am a complete noob to scripting, but i need a bit of script to do this:
When either an allied of axis goes in to an area of the map the round is over and which ever team got to this place first then that team wins that round.
Thanks for your help
Dani

Posted: Sun Jul 18, 2004 5:19 pm
by strafer
You can create a trigger_multiple ( local.win = spawn trigger_multiple) and have it when a player reaches that spot, it goes to the win trigger (local.win setthread mythread). You would probobly need to create a thread title. So you have it go to your thread and this would be the trigger "teamwin allies" or "teamwin axis".
Posted: Sun Jul 18, 2004 5:39 pm
by Splaetos
if you make a trigger in the area, and the first person to set it off wins... the thread should look something like this... or you can use the set thread thing, and then figure out which team it is. Either way, you have to read which team set it off.
win_thread:
win_trigger waitTill trigger
local.player = parm.other
if (local.player.dmteam == "allies")
teamwin allies
else
teamwin axis
end
Posted: Sun Jul 18, 2004 6:34 pm
by strafer
Splaetos wrote:if you make a trigger in the area, and the first person to set it off wins... the thread should look something like this... or you can use the set thread thing, and then figure out which team it is. Either way, you have to read which team set it off.
win_thread:
win_trigger waitTill trigger
local.player = parm.other
if (local.player.dmteam == "allies")
teamwin allies
else
teamwin axis
end
That's true, but for the trigger:
if (local.player.dmteam == "allies")
teamwin allies
else
teamwin axis
it needs to look like this:
if (local.player.dmteam == allies)
{
teamwin allies
}
else
{
teamwin axis
}
end
You need brackets and no quotes on allies

Posted: Sun Jul 18, 2004 6:42 pm
by Splaetos
do you need brackets with one line if and else? I know you dont for a one line if statement...
anyway, I always put in the brackets myself just cause im never sure lol...
allies and axis in quotes or not is also an area im never sure about. When ive made my own i dont use quotes usualy, but often I see it in quotes, like in obj_dm.scr when its trying to decide what soudn to play, it uses
if (local.player.dmteam = "allies")
Posted: Sun Jul 18, 2004 8:52 pm
by strafer
Splaetos wrote:do you need brackets with one line if and else? I know you dont for a one line if statement...
anyway, I always put in the brackets myself just cause im never sure lol...
allies and axis in quotes or not is also an area im never sure about. When ive made my own i dont use quotes usualy, but often I see it in quotes, like in obj_dm.scr when its trying to decide what soudn to play, it uses
if (local.player.dmteam = "allies")
Maybe you can, but I just haven't ever used quotes.
Posted: Sun Jul 18, 2004 9:52 pm
by blue60007
You do not need brackets if it is one line:
if(level.somvar==1)
//something
It should be in quotes because it is a string, I think.
Posted: Wed Jul 21, 2004 4:17 pm
by Dani
Rit...
i know Actionscript yeh, and I KNOW the IF and ELSE things and they Do need bracets. But the thing i don't know is this:
How to make a trigger
And were to put the script????
Please be more detailed in your answers!?
Thanks
