Page 3 of 3

Posted: Tue Oct 11, 2005 1:42 pm
by CTpenok
thx Rookie One !

In radiant I changed the target settings from:
classname: trigger_useonce
setthread: opentruck01_disabled
to
classname: trigger_use
setthread: opentruck01_disabled

and I used your script.
This is what happens.

Only Allies can cut the wires witch is good but,
When I'm alone on the server I shouldn't be able to cut the wires couse it's an objective and you have to wait for at least one other player but I can :(
When another player is on the server and joins the axis while I'm on the allied side the allies win without doing anything.
A new round starts and right away the allies win again.
This keeps on happening.

btw sry I forgot to say it's a Spearhead map

Posted: Tue Oct 11, 2005 5:49 pm
by Rookie One.pl
What is the name of the map (the one you use to start it - e.g. obj/mymapname)? You might encounter problems in objective mode if its name doesn't start with obj_ (so it should be like obj_yourmap). I ran some experiments (:P) that show that some things in the objective gametype work only if the map is named like this.

If you want the allies to be able to cut the wires only if the round starts, remove the setthread key/value from the triggers, give them some targetnames (I suggest cuttrigger01, cuttrigger02 & cuttrigger03) and use this script instead:

Code: Select all

  main:
 
   setcvar "g_obj_alliedtext1" "" 
   setcvar "g_obj_alliedtext2" ""
   setcvar "g_obj_alliedtext3" ""
  
   setcvar "g_obj_axistext1" ""
   setcvar "g_obj_axistext2" ""
   setcvar "g_obj_axistext3" ""
   
   setcvar "g_scoreboardpic" ""
   
   $cutwire01 hide
   $cutwire02 hide
   $cutwire03 hide
   
   level waittill prespawn
  
   exec global/DMprecache.scr
   
   level.script = maps/obj/nonameyet_obj.scr
  
   exec global/ambient.scr obj_team2.scr
   // Initialize the exploder subsystem
   exec global/door_locked.scr::lock
   thread global/exploder.scr::main
   
   level waittill spawn
  
   level.defusing_team = "axis
   level.planting_team = "allies"
   level.targets_to_destroy = 2
   level.bomb_damage = 200
   level.bomb_explosion_radius = 2048
   level.dmrespawning = 0 // 1 or 0 (0=no respawn)
   level.dmroundlimit = 10 // round time limit in minutes
   level.clockside = axis // axis, allies, kills, or draw

   level waittill roundstart

   $cuttrigger01 setthread opentruck01_disabled
   $cuttrigger02 setthread opentruck02_disabled
   $cuttrigger03 setthread opentruck03_disabled
   
   $v2_explode thread global/obj_dm.scr::bomb_thinker
   $ctrlroom_explode thread global/obj_dm.scr::bomb_thinker

   thread allies_win_bomb

   $v2_explode thread axis_win_timer
 end

 // Allied victory
 allies_win_bomb:

   while((level.targets_destroyed < level.targets_to_destroy) && (level.opentruck01_disabled && level.opentruck02_disabled && level.opentruck03_disabled)) {
     waitframe
   }

   teamwin allies
 end 
 
 // Axis victory
 axis_win_timer:

   level waittill axiswin
 end 

//*********************************************
// Disable truck 1
//*********************************************
opentruck01_disabled:
   local.player = parm.other
   if (local.player.dmteam == allies)
   {
	$wire01 remove
	$opentruck01 playsound m1l2b_disabletruck
	$cutwire01 show
	level.opentruck01_disabled = 1
	iprintlnbold_noloc "Wire 01 has been disabled!"
	self delete
   }
end
	
//*********************************************
// Disable truck 2
//*********************************************
opentruck02_disabled:
   local.player = parm.other
   if (local.player.dmteam == allies)
   {
	$wire02 remove
	$opentruck02 playsound m1l2b_disabletruck
	$cutwire02 show
	level.opentruck02_disabled = 1
	iprintlnbold_noloc "Wire 02 has been disabled!"
	self delete
   }
end

//*********************************************
// Disable truck 3
//*********************************************
opentruck03_disabled:
   local.player = parm.other
   if (local.player.dmteam == allies)
   {
	$wire03 remove
	$opentruck03 playsound m1l2b_disabletruck
	$cutwire03 show
	level.opentruck03_disabled = 1
	iprintlnbold_noloc "Wire 03 has been disabled!"
	self delete
   }
end
This will make it so that the threads are linked to the triggers after the round starts.

Posted: Tue Oct 11, 2005 11:29 pm
by CTpenok
Thx Rookie,

I wil give it a try