Page 1 of 1
flag raising
Posted: Mon May 12, 2003 2:29 am
by brendank310
ive made a map, where a flag will be raised by allies to complete the objective. i made a brush for the flag, which acts as an elevator. i want the allies to win the obj match when the flag is raised. im not to sure on the syntax of scripting, but it would be like wait until $flag is at $flagup. could someone tell me how i would actually write this. or tell me how an obj match could be ended just by a trigger being "used" ? any help will be much appreciated.
Posted: Mon May 12, 2003 11:25 am
by bdbodger
I think a trigger_multiple with the monsters flag set will work . In the stuka gag script for spearhead the plane is a script model and when it hits a trigger it drops a bomb or starts a strifeing run . I think a script object might do the same I don't know . You could put a trigger at the top of the flag pole and if the flag reaches it , it will trigger the win .
Posted: Mon May 12, 2003 11:50 am
by TheShiznaeSpe
u can try:
main:
level waittill prespawn
level waittill spawn
thread axis_win_clock
$flag_trigger waitthread flag_raise // leave at the end of main
thread allies_win_flag
end
flag_raise:
while(1)
{
self waittill trigger
local.triggerer = parm.other
if(local.triggerer.dmteam == "allies")
break
wait 0.1
}
end
allies_win_flag:
$flag moveup 128 // height of flag
teamwin allies
end
axis_win_clock:
level waittill axiswin
end
correction
Posted: Mon May 12, 2003 2:06 pm
by tltrude
You left out the command that makes it move:
//---------------------------
allies_win_flag:
$flag moveup 128 // height of flag pole
$flag waitmove
teamwin allies
end
//---------------------------
Also, shouldn't the line "thread allies_win_flag" be inside the while brackets? The way you have it now, the game will end right after spawn.
//---------------------------
flag_raise:
while(1)
{
self waittill trigger
local.triggerer = parm.other
if(local.triggerer.dmteam == "allies")
{
thread allies_win_flag
break
}
wait 0.1
}
//---------------------------
Posted: Mon May 12, 2003 5:21 pm
by nuggets
and u both missed TIME!!!
some people really go over the top when scripting
create trigger->use
key: targetname
value: flag_trigger
key: setthread
value: flag_move
main:
end
flag_move:
if ( parm.other.dmteam == allies )
{
$flag_trigger
$flag time 5 // the time it takes to get there
$flag moveUp 128 // the extra height it will move
$flag waitmove
teamwin allies
}
end
Posted: Mon May 12, 2003 7:56 pm
by TheShiznaeSpe
thanks for the corrections, i did that this morning at 6:30 am on the way to school
Posted: Mon May 12, 2003 10:12 pm
by nuggets
lol, np's
we'll just have 2 wait and c if any of them work

Posted: Tue May 13, 2003 9:40 am
by mohaa_rox
Don't forget to use a script object (is this mentioned already?) or it will not work.
Posted: Tue May 13, 2003 11:01 am
by nuggets
and with the flag
script->object
key: targetname
value: flag
that also seems to of been missed out somehow... even though i'm sure i typed that

Posted: Fri May 16, 2003 11:14 am
by Slyk
And do you need to use 'hide'/'show' so that the flag pops in when triggered???? and goes away if the other team captures that point.??
Posted: Fri May 16, 2003 11:56 am
by mohaa_rox
u can use it to move up or down.