flag raising
Moderator: Moderators
-
brendank310
- Corporal
- Posts: 27
- Joined: Mon Apr 07, 2003 11:02 am
- Contact:
flag raising
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.
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 .
-
TheShiznaeSpe
- Major
- Posts: 304
- Joined: Wed Feb 05, 2003 11:45 pm
- Location: US
- Contact:
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
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
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
}
//---------------------------
//---------------------------
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
}
//---------------------------
-
nuggets
- General
- Posts: 1006
- Joined: Fri Feb 28, 2003 2:57 am
- Location: U-england-K (england in the UK) :P
- Contact:
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
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
hope this helps, prob not cos it's all foreign 2 me :-/
-
TheShiznaeSpe
- Major
- Posts: 304
- Joined: Wed Feb 05, 2003 11:45 pm
- Location: US
- Contact:
