right then, nearly there, couple of errors in my script
if you want only 1 person to of waited 30 seconds then it's kinda ok, but i'm guessing from looking at the size of the building as long as one team member is still remaining at the end of 30 seconds and no enemies in there, then they'll win, so...
create outside the 3 doors to the building trigger->multiple
key:setthread
value: ive_gone
// Title: Kuwaiti City-King of the Hill Version
// Architecture: TheShiznaeSpe
// Scripting: TheShiznaeSpe, tltrude, and KOTH by nuggets!!!!
main:
level.allies_counters = 0 //sets the count of number of allies trying to activate the counter
level.axis_counters = 0 //sets the count of the number of axis trying to activate the counter
$iraq_indicator show
$us_indicator show
iprintln "Target building EMPTY."
setcvar "g_obj_alliedtext1" "-Hold the"
setcvar "g_obj_alliedtext2" "target"
setcvar "g_obj_alliedtext3" "building"
setcvar "g_obj_axistext1" "-Hold the"
setcvar "g_obj_axistext2" "target"
setcvar "g_obj_axistext3" "building"
setcvar "g_scoreboardpic" "none"
level waittill prespawn
//exec global/DMprecache.scr
level.script = maps/obj/OBJ_Kuwaiti_City_koth.scr
level waittill spawn
level.dmrespawning = 1
level.dmroundlimit = 20
level.clockside = draw
//level waittill roundstart
end
im_here:
local.player = parm.other
if (local.player.dmteam == "allies") //if triggerer = allies and
{
if ( local.player.were_counting == 1 ) //he hasn't already started coutning
{
local.player.were_counting = 0 //tells him he's now counting
local.player.counter = 0 //gives him a starting count
local.player thread count_me_in_im_an_ally //goes to the counting thread
iprintln "US has entered and is holding the target buidling."
$iraq_indicator hide
$us_indicator show
level.allied_counters++
}
} //let's the game know there's an ally counting
if (local.player.dmteam == "axis") //all the same but for axis
{
if ( local.player.were_counting == 0 )
{
local.player.were_counting = 1
local.player.counter = 0
local.player thread count_me_in_im_an_axis
iprintln "IRAQ has entered and is holding the target buidling."
$iraq_indicator show
$us_indicator hide
level.axis_counters++
}
}
end
ive_gone
local.player.were_counting = 0
end
count_me_in_im_an_ally:
if ( level.axis_counters == 0 ) //if any axis are counting, he can't count
{
if ( self istouching $target_building_trigger ) //if he's touching the trigger keep counting
{
if ( self.counter < 30 ) //if he hasn't reached the time limit keep counting
{
self.counter++ //add 1 to the counter
wait 1 //wait's a second
self thread count_me_in_im_an_ally //restarts the thread
end
}
else //if time limit has been reached
{
teamwin allies //allies win
iprintln "U.S. WINS!!!"
//local.player addkills 1
local.player stufftext "I was the KING!"
wait 1
end
}
local.player.were_counting = 0 //if not touching anymore, tell him he's not counting
level.allies_counters--
} //minus 1 from the total number of allies counting
}
count_me_in_im_an_axis:
if ( level.allies_counters == 0 )
{
if ( self istouching $target_building_trigger )
{
if ( self.counter < 30 )
{
self.counter++
wait 1
self thread count_me_in_im_an_axis
end
}
else
{
teamwin axis
iprintln "IRAQ WINS!!!"
//local.player addkills 1
local.player stufftext "I was the KING!"
wait 1
end}
local.player.were_counting = 0
level.axis_counters--
}
}
/*i'm gonna send this post and then give it some thought for just 1 counter, rather than every1 having there own for what i mentioned all the way back at the top

*/