Axis Bomb Obj

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
User avatar
Gen Cobra
Major General
Posts: 739
Joined: Tue Jan 28, 2003 4:26 pm

Axis Bomb Obj

Post by Gen Cobra »

Is this right? Please help me cause I am trying to get the Axis obj to bomb the plane. All I did was switch names.

Code: Select all

main:


setcvar "g_obj_alliedtext1" "Stop The Terrorists" 
setcvar "g_obj_alliedtext2" ""
setcvar "g_obj_alliedtext3" "" setcvar "g_obj_axistext1" "Destroy the Plane"
setcvar "g_obj_axistext2" ""
setcvar "g_obj_axistext3" ""
setcvar "g_scoreboardpic" "cna"


level waittill prespawn


exec global/DMprecache.scr
level.script = maps/obj/city_nights_airport_obj.scr
exec global/ambient.scr city_nights_airport_obj
thread global/exploder.scr::main // Initialize the exploder subsystem


level waittill spawn


level.defusing_team = "allies"
level.planting_team = "axis" 
level.targets_to_destroy = 1 
level.bomb_damage = 300 
level.bomb_explosion_radius = 3000 // Default radius of bomb blast


// 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 // set to axis, allies, kills, or draw


// level waittill roundstart // Comment out this line using '//' before it to be able to set the bomb when alone on the map ( just for testing )


$panel_bomb thread global/obj_dm.scr::bomb_thinker // "panel_bomb" is the targetname set on the bomb in MOHRadiant
thread axis_win_bomb 
$panel_bomb thread allies_win_timer 
end // end of main

// Axis victory test


axis_win_bomb:
while(level.targets_destroyed < level.targets_to_destroy) // While undestroyed objectives left
waitframe // chill out
teamwin axis // No objectives left axis win
end // end axis victory test

// allies victory test


allies_win_timer:
level waittill allieswin 
end // end allies victory test
Image
nuggets
General
Posts: 1006
Joined: Fri Feb 28, 2003 2:57 am
Location: U-england-K (england in the UK) :P
Contact:

Post by nuggets »

haven't read the whole of the script cos of a few pints in the system now :P

but...

u've put clockside and planting side as axis, so even if the bomb isn't planted they'll still win
hope this helps, prob not cos it's all foreign 2 me :-/
User avatar
Gen Cobra
Major General
Posts: 739
Joined: Tue Jan 28, 2003 4:26 pm

Post by Gen Cobra »

nuggets wrote:haven't read the whole of the script cos of a few pints in the system now :P

but...

u've put clockside and planting side as axis, so even if the bomb isn't planted they'll still win
Listen I have 0 idea about obj mp maps. I just want to have the basic idea if I switch the names will it be an axis bomb obj or not?
Image
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Gen Cobra wrote:
nuggets wrote:haven't read the whole of the script cos of a few pints in the system now :P

but...

u've put clockside and planting side as axis, so even if the bomb isn't planted they'll still win
Listen I have 0 idea about obj mp maps. I just want to have the basic idea if I switch the names will it be an axis bomb obj or not?
Yes :)
Image
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

Change

Post by tltrude »

Change "level.clockside = axis" to "level.clockside = allies" and it should work. The bomb must be targetnamed "panel_bomb" in the map.

This is what happens with your current script--after you fix the above line:

The Allies will win after 5 minutes, if the bomb has not gone off.
The bomb blast will kill (300 damage) every player within 3000 units of it.

I don't see why you are asking if it is going to work without testing it yourself first? The script is set for one player testing. Have you never played an objective game?
Tom Trude,

Image
nuggets
General
Posts: 1006
Joined: Fri Feb 28, 2003 2:57 am
Location: U-england-K (england in the UK) :P
Contact:

Post by nuggets »

i don't question people capabilities in scripting i was just pointing in that the planting and clockside teams were the same, it may of been that you wanted allies to be on clockside, meaning that when the clock ran out the allies would win, that was all :(
hope this helps, prob not cos it's all foreign 2 me :-/
User avatar
Gen Cobra
Major General
Posts: 739
Joined: Tue Jan 28, 2003 4:26 pm

Re: Change

Post by Gen Cobra »

tltrude wrote:I don't see why you are asking if it is going to work without testing it yourself first? The script is set for one player testing. Have you never played an objective game?
I don't play obj. If all you need to do is say yes or no I don't see why you are asking me that. Besides if i can ask someone here and get an answer before I take the hours it takes to test this new obj map, I'm gonna ask man.

BTW thanks for helping, all of you. 8)
Image
nuggets
General
Posts: 1006
Joined: Fri Feb 28, 2003 2:57 am
Location: U-england-K (england in the UK) :P
Contact:

Post by nuggets »

lol, makes sense to ask in here :P

i'll agree with ya on that one :D

and i'd just like to ask tltrude, if play testing as axis, to playtest... would you just sit there and wait for the time limit to run out to make sure the allies win, or plant the bombs :?:
hope this helps, prob not cos it's all foreign 2 me :-/
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

nope

Post by tltrude »

No, I would change the time in the script to one min. And, I could test it in the game in less time then it takes to post the question here. As a matter of fact, the script can be edited while the game is running too--by typing editscript in the console.
Tom Trude,

Image
nuggets
General
Posts: 1006
Joined: Fri Feb 28, 2003 2:57 am
Location: U-england-K (england in the UK) :P
Contact:

Post by nuggets »

then you shall now be my new idol for thoroughness :P (if that's a word)
hope this helps, prob not cos it's all foreign 2 me :-/
Post Reply