Page 1 of 1

Help with new objective map (create a custom exploder)

Posted: Thu Jul 28, 2005 1:17 am
by Goldeneye090
I tried to make an objective where the allies have to blow up a bunker (around 8 brushes that I made exploders) I went to the The Rjukan Project website and use one of Bjarne Gr?nnevik's tutorials for this...I think the scripting part is correct, and I'm more concerned about the mapping part, but I'm not sure where the problem is (I can't set the bomb even when I remove the line, "level waittill roundstart")

I'll post the script first, please post if there are any obvious errors...

Map name: obj_test (mohaa/mainta/maps/obj)
Tutorial/Script baseline found here: http://www.gronnevik.se/rjukan/index.ph ... eExplosion
^^^Also found on this site.

Code: Select all

main:
   setcvar "g_obj_alliedtext1" "Destroy" 
   setcvar "g_obj_alliedtext2" "The"
   setcvar "g_obj_alliedtext3" "Bunker"
   setcvar "g_obj_axistext1" "Defend"
   setcvar "g_obj_axistext2" "The"
   setcvar "g_obj_axistext3" "Bunker"
   setcvar "g_scoreboardpic" "none"
   level waittill prespawn
   exec global/DMprecache.scr
   level.script = maps/obj/obj_test.scr
   exec global/ambient.scr obj_test
   // Initialize the exploder subsystem
   thread global/exploder.scr::main
   level waittill spawn
   // Axis like the bombs unplanted
   level.defusing_team = "axis"
   // Allies will try to plant the bombs
   level.planting_team = "allies"
   // Number of targets in this map
   level.targets_to_destroy = 1
   // Default damage of the bomb 
   level.bomb_damage = 200
   // Default radius of bomb blast
   level.bomb_explosion_radius = 2048
   // Set the parameters for round based match
   level.dmrespawning = 0 // 1 or 0 (0=no respawn)
   level.dmroundlimit = 5 // round time limit in minutes
   level.clockside = axis // axis, allies, kills, or draw
   // Comment out this line to be able to set the bomb
   // when alone on the map ( just for testing )
   // level waittill roundstart
   $panel_bomb thread global/obj_dm.scr::bomb_thinker
   // "panel_bomb" is the targetname of a bomb in Radiant
   thread allies_win_bom
   // Start the win check thread for allies
   // Start the win check thread for axis
   $panel_bomb thread axis_win_timer
 end // end of main

 // Allied victory test
 allies_win_bomb:
   // While undestroyed objectives left
   while(level.targets_destroyed < level.targets_to_destroy) 
   {
     // chill out
     waitframe
   }
   // No objectives left allies win
   teamwin allies
 end // end allied victory test

 // Axis victory test
 axis_win_timer:
   // At the end Axis win
   level waittill axiswin
 end // end axis victory test
Otherwise, does anyone feel like taking a look at the .map?

Thanks.

one problem

Posted: Thu Jul 28, 2005 3:21 pm
by tltrude
This line is not right: thread allies_win_bom

Posted: Thu Jul 28, 2005 3:39 pm
by Goldeneye090
I found that error and a few others after I posted, still doesn't work :\ I'll check my targetnames and all that again.

Also: there is suppose to be a red line connecting the trigger_use and the bomb right?

Posted: Thu Jul 28, 2005 5:03 pm
by hogleg
Klik on Tom's sig and DL Test Bomber, it has the .map file.

Posted: Thu Jul 28, 2005 5:16 pm
by Goldeneye090
I need the player (allies) to set the bomb, that map is based on players activating planes to blow things up :\

Posted: Thu Jul 28, 2005 5:39 pm
by lizardkid
then open the exploder.scr and look at the variables you need to change manually inscript to make it win when the planes hit the exploder.

Posted: Thu Jul 28, 2005 8:12 pm
by Goldeneye090
Ok I found out why I couldn't set the bomb. Sometime after posting this I tried to fix it and cancelled out the levelwaittill roundstart line..fixed

Is there anything wrong with this script that I missed? (it's for the bomb and a drivable/shootbale tank and jeep, from my other post)

Code: Select all

main:
   setcvar "g_obj_alliedtext1" "Blow" 
   setcvar "g_obj_alliedtext2" "Stuff"
   setcvar "g_obj_alliedtext3" "Up"
   setcvar "g_obj_axistext1" "Defend"
   setcvar "g_obj_axistext2" "The"
   setcvar "g_obj_axistext3" "Stuff"
   setcvar "g_scoreboardpic" "none"

   if(level.roundbased)
   thread roundbasedthread

   level waittill prespawn
   exec global/DMprecache.scr
   exec global/ambient.scr mohdm6
   level.script = maps/obj/obj_test.scr
   thread global/exploder.scr::main
   level waittill spawn
   exec global/playervehicle.scr ( -496.0 928.0 -168.0 ) -160 1
   exec global/playervehicle.scr ( -2752.0 -584.0 -168.0 ) -60 2
   exec global/playervehiclesound.scr
   level.defusing_team = "axis"
   level.planting_team = "allies"
   level.targets_to_destroy = 1 
   level.bomb_damage = 200
   level.bomb_explosion_radius = 2048
end
//--------------------------------------------------------------------------
roundbasedthread:
   level.dmrespawning = 0
   level.dmroundlimit = 5
   level.clockside = axis
   // level waittill roundstart
   $bunker_bomb thread global/obj_dm.scr::bomb_thinker
   thread allies_win_bomb
   $bunker_bomb thread axis_win_timer
end

   allies_win_bomb:
   while(level.targets_destroyed < level.targets_to_destroy) 
   {   
   waitframe
   }
   teamwin allies
end

   axis_win_timer:
   level waittill axiswin
end