I found a few typos, and i think i corrected an error in ive_gone. However, the obj still doesn't work. The script semi-works because the scroboard messages load, but the rest of the scripting does nothing.
Here's what I'm working with:
// 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
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
iprintln "Target building EMPTY."
//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
locprint 30 100 "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
locprint 30 100 "IRAQ has entered and is holding the target buidling."
$iraq_indicator show
$us_indicator hide
level.axis_counters++
}
}
end
ive_gone:
if(local.player.were_counting == 1) //this stuff added to correct script error-it seems to work
{
local.player.were_counting = 0
end
}
else
{
}
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
locprint 30 100 "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
}
end
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
locprint 30 100 "IRAQ WINS!!!"
//local.player addkills 1
local.player stufftext "I was the KING!"
wait 1
end
}
local.player.were_counting = 0
level.axis_counters--
}
}
end