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.
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".
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~
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
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~
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.