Win for Allies or Axis

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
Dani
Sergeant Major
Posts: 113
Joined: Mon Mar 08, 2004 6:45 pm
Contact:

Win for Allies or Axis

Post 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 :D
strafer
Captain
Posts: 237
Joined: Sat Jan 31, 2004 11:29 pm
Location: The Motherland..
Contact:

Post 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".
Splaetos
Major General
Posts: 730
Joined: Tue Jan 20, 2004 2:55 pm
Contact:

Post 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
When I am king, you will be first against the wall~
Image
strafer
Captain
Posts: 237
Joined: Sat Jan 31, 2004 11:29 pm
Location: The Motherland..
Contact:

Post 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 8-)
Splaetos
Major General
Posts: 730
Joined: Tue Jan 20, 2004 2:55 pm
Contact:

Post 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")
When I am king, you will be first against the wall~
Image
strafer
Captain
Posts: 237
Joined: Sat Jan 31, 2004 11:29 pm
Location: The Motherland..
Contact:

Post 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.
blue60007
General
Posts: 1247
Joined: Sun Mar 07, 2004 11:44 pm

Post 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.
Image
Dani
Sergeant Major
Posts: 113
Joined: Mon Mar 08, 2004 6:45 pm
Contact:

Post 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 :lol:
Post Reply