How to use an entire dm team?
Moderator: Moderators
Confused
"nuggets" has that effect on a lot of people, ha ha. Maybe this will help:
"++" = adds one to the variable
"--" = subtracts one from the variable
To understand his script, follow the "setthread" that the trigger will run when a player enters it.
"++" = adds one to the variable
"--" = subtracts one from the variable
To understand his script, follow the "setthread" that the trigger will run when a player enters it.
-
nuggets
- General
- Posts: 1006
- Joined: Fri Feb 28, 2003 2:57 am
- Location: U-england-K (england in the UK) :P
- Contact:
i may confuse people but the problme gets sorted, well sometimes, no i'm lying it usually gets wrong and tltrude comes to the rescue
, but i was in a rush to get out last night
well in summary you'd need something like this
trigger->multiple
key: targetname
value: area_trigger
key: setthread
value: im_here
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
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 = 1 //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
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 == 1 )
{ local.player.were_counting = 1
local.player.counter = 0
local.player thread count_me_in_im_an_axis
level.axis_counters++ }}
end
count_me_in_im_an_ally:
if ( level.axis_counters == 0 ) //if any axis are counting, he can't count
{ if ( self istouching $area_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
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 $area_trigger )
{ if ( self.counter < 30 )
{ self.counter++
wait 1
self thread count_me_in_im_an_axis
end}
else
{teamwin axis
wait 1
end}
local.player.were_counting = 0
level.axis_counters--}
}
/*::amended::
::
you really are thorough
::*/
well in summary you'd need something like this
trigger->multiple
key: targetname
value: area_trigger
key: setthread
value: im_here
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
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 = 1 //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
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 == 1 )
{ local.player.were_counting = 1
local.player.counter = 0
local.player thread count_me_in_im_an_axis
level.axis_counters++ }}
end
count_me_in_im_an_ally:
if ( level.axis_counters == 0 ) //if any axis are counting, he can't count
{ if ( self istouching $area_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
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 $area_trigger )
{ if ( self.counter < 30 )
{ self.counter++
wait 1
self thread count_me_in_im_an_axis
end}
else
{teamwin axis
wait 1
end}
local.player.were_counting = 0
level.axis_counters--}
}
/*::amended::
::
Last edited by nuggets on Sat Jun 28, 2003 1:40 pm, edited 2 times in total.
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:
OK, I give up, lol
I'm too retarded to get this script to work. The script loads, without any hitch, but the obj just doesn't work.
Here's what I've been working with (maybe someone can point me in the right direction):
// 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 = 1 //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 == 1 )
{
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
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--
}
}
Yes, I've tried it the way nuggets wrote it, without the line breaks. It didn't work.
Possible brainstorming ideas:
Should there be an "end" at the bottom of count_me_in_im_an_axis and count_me_in_im_an_ally?
Do level.allies_counters = 0 and level.axis_counters = 0 need a definition?
hmm
I'm too retarded to get this script to work. The script loads, without any hitch, but the obj just doesn't work.
Here's what I've been working with (maybe someone can point me in the right direction):
// 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 = 1 //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 == 1 )
{
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
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--
}
}
Yes, I've tried it the way nuggets wrote it, without the line breaks. It didn't work.
Possible brainstorming ideas:
Should there be an "end" at the bottom of count_me_in_im_an_axis and count_me_in_im_an_ally?
Do level.allies_counters = 0 and level.axis_counters = 0 need a definition?
hmm
-
nuggets
- General
- Posts: 1006
- Joined: Fri Feb 28, 2003 2:57 am
- Location: U-england-K (england in the UK) :P
- Contact:
oops forgot the ends 
you can either send me the map, and i'll have a closer look or put println's in and find where it's breaking
the level.allies_counters and level.axis_counters are just making sure that there's no-one on the other team counting
e-mail below (unless it's spearhead) then don't e-mail
you can either send me the map, and i'll have a closer look or put println's in and find where it's breaking
the level.allies_counters and level.axis_counters are just making sure that there's no-one on the other team counting
e-mail below (unless it's spearhead) then don't e-mail
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:
-
nuggets
- General
- Posts: 1006
- Joined: Fri Feb 28, 2003 2:57 am
- Location: U-england-K (england in the UK) :P
- Contact:
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
*/
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
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:
-
brendank310
- Corporal
- Posts: 27
- Joined: Mon Apr 07, 2003 11:02 am
- Contact:
i want to thank all of you for helping out. it is much appreciated from the aoi team. when i start making the credits, expect your name to be there. and i have surprise for ya, if i can get a hold of you on im. thebtk2001@hotmail.com and brendank310 on aim.
lol will my be in??brendank310 wrote:i want to thank all of you for helping out. it is much appreciated from the aoi team. when i start making the credits, expect your name to be there. and i have surprise for ya, if i can get a hold of you on im. thebtk2001@hotmail.com and brendank310 on aim.
Live to map, not map to live.
-mohaa_rox, .map
moderator
-mohaa_rox, .map
moderator
-
TheShiznaeSpe
- Major
- Posts: 304
- Joined: Wed Feb 05, 2003 11:45 pm
- Location: US
- Contact:
-
TheShiznaeSpe
- Major
- Posts: 304
- Joined: Wed Feb 05, 2003 11:45 pm
- Location: US
- Contact:
