Help with new objective map (create a custom exploder)

If you're looking for mapping help or you reckon you're a mapping guru, post your questions / solutions here

Moderator: Moderators

Post Reply
Goldeneye090
Colour Sergeant
Posts: 79
Joined: Mon May 10, 2004 10:11 pm

Help with new objective map (create a custom exploder)

Post 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.
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

one problem

Post by tltrude »

This line is not right: thread allies_win_bom
Tom Trude,

Image
Goldeneye090
Colour Sergeant
Posts: 79
Joined: Mon May 10, 2004 10:11 pm

Post 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?
User avatar
hogleg
General
Posts: 1577
Joined: Tue Sep 09, 2003 5:23 pm
Location: Down South Hillbilly Country

Post by hogleg »

Klik on Tom's sig and DL Test Bomber, it has the .map file.
"all the governments in the world are corrupt and in the hands of the Illuminati"
Goldeneye090
Colour Sergeant
Posts: 79
Joined: Mon May 10, 2004 10:11 pm

Post by Goldeneye090 »

I need the player (allies) to set the bomb, that map is based on players activating planes to blow things up :\
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post 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.
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
Goldeneye090
Colour Sergeant
Posts: 79
Joined: Mon May 10, 2004 10:11 pm

Post 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
Post Reply