Flak88 2 obj help!!!!!

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
7th Es Cyborg
First Lieutenant
Posts: 189
Joined: Fri Dec 13, 2002 5:00 pm
Location: PA
Contact:

Flak88 2 obj help!!!!!

Post by 7th Es Cyborg »

ok here are my setting for the objects in the map:

flak88 has these settings:
$destroyed_model models/statweapons/flak88_d.tik
classname script_origin
model statweapons/flak88turret.tik
targetname flak88_wp1 ( used wp2 for 2nd flak )

trigger:
classname trigger_use
targetname flak88_tg1 ( tg2 )

the bomb:
$explosion_fx fx/fx_flak88_expolsion.tik
$explosion_sound explode_aagun
$trigger_name flak88_tg1 ( tg2 )
model items/pulse_explosive.tik
target flak88_wp1 ( wp2 )
targetname flak88_ex1 ( ex 2 )

and above both I have this
classname script_origin
targetname flak88_target1
( not sure about this - read that it wasn't needed but added it above both flaks anyway, but I kept the target name the same )

and for my scr:


main:

level waittill prespawn

exec global/DMprecache.scr

level.script = maps/obj/NightRaidobj.scr
exec global/ambient.scr teamdm1


setcvar "g_obj_alliedtext1" "Destroy the Flac88's"
setcvar "g_obj_alliedtext2" ""
setcvar "g_obj_alliedtext3" ""
setcvar "g_obj_axistext1" "- Prevent Allies from"
setcvar "g_obj_axistext2" "destroying the Flak88's"
setcvar "g_obj_axistext3" ""
setcvar "g_scoreboardpic" "textures/mohmenu/dmloading/blah.tga"

if(level.roundbased)
thread roundbasedthread

level waittill spawn

level.bomb_damage = 200
level.bomb_explosion_radius = 440
level.defusing_team = "axis"
level.planting_team = "allies"
level.targets_to_destroy = 2
level.dmrespawning = 1 // 1 or 0
level.dmroundlimit = 10 // round time limit in minutes
level.clockside = axis // set to axis, allies, kills, or draw

level waittill roundstart

$flak88_ex1 thread global/obj_dm.scr::bomb_thinker
$flak88_ex2 thread global/obj_dm.scr::bomb_thinker

$88mm_explosive1 thread axis_win_timer
thread allies_win_bomb $88mm_explosive1 $88mm_explosive2

thread bomb1_exploded $88mm_explosive1
thread bomb2_exploded $88mm_explosive2

end

//*** --------------------------------------------
//*** "Axis Victory"
//*** --------------------------------------------

axis_win_timer:

level waittill axiswin

end

//*** --------------------------------------------
//*** "Allied Victory"
//*** --------------------------------------------

allies_win_bomb:

while(level.targets_destroyed < level.targets_to_destroy)
waitframe

teamwin allies
end

//*** --------------------------------------------
//*** "Bomb 1 Exploded"
//*** --------------------------------------------

bomb1_exploded local.bomb1:

while (local.bomb1.exploded != 1)

wait .1

iprintlnbold "Allies have destroyed the Western Cannon!"


end


//*** --------------------------------------------
//*** "Bomb 2 Exploded"
//*** --------------------------------------------

bomb2_exploded local.bomb2:

while (local.bomb2.exploded != 1)

wait .1

iprintlnbold "Allies have destroyed the Eastern Cannon!"


end

//----------------------------------------------

roundbasedthread:

level waitTill prespawn

level waittill spawn

level.dmrespawning = 0
level.dmroundlimit = 5
level.clockside = kills

level waittill roundstart

end
_______________________________________________


now my problem - one flak will blow and the other one won't also i don't get the ingame messages to show saying a flak has been blown

Can someone sort this out for me. I've got no clue how to really do this and I'm working of a tut.
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Re: Flak88 2 obj help!!!!!

Post by jv_map »

7th Es Cyborg wrote: thread bomb1_exploded $88mm_explosive1
thread bomb2_exploded $88mm_explosive2
Shouldn't this be
thread bomb1_exploded $flak88_ex1
thread bomb2_exploded $flak88_ex2
?

:?
Image
7th Es Cyborg
First Lieutenant
Posts: 189
Joined: Fri Dec 13, 2002 5:00 pm
Location: PA
Contact:

Post by 7th Es Cyborg »

ok after talking to Balr14 and using his script from prado1 I made this ( with the correct explosion thread this time ), but it still does not work. Flak88_wp1 will blow, but I can't set the other one.

here is my current scr:


main:

level waittill prespawn

exec global/DMprecache.scr

level.script = maps/obj/NightRaidobj.scr
exec global/ambient.scr teamdm1


setcvar "g_obj_alliedtext1" "Destroy the Flac88's"
setcvar "g_obj_alliedtext2" ""
setcvar "g_obj_alliedtext3" ""
setcvar "g_obj_axistext1" "- Prevent Allies from"
setcvar "g_obj_axistext2" "destroying the Flak88's"
setcvar "g_obj_axistext3" ""
setcvar "g_scoreboardpic" "textures/mohmenu/dmloading/blah.tga"

if(level.roundbased)
thread roundbasedthread

level waittill spawn

level.bomb_damage = 200
level.bomb_explosion_radius = 440
level.defusing_team = "axis"
level.planting_team = "allies"
level.targets_to_destroy = 2
level.dmrespawning = 1 // 1 or 0
level.dmroundlimit = 10 // round time limit in minutes
level.clockside = axis // set to axis, allies, kills, or draw

level waittill roundstart

$flak88_ex1 thread global/obj_dm.scr::bomb_thinker
$flak88_ex2 thread global/obj_dm.scr::bomb_thinker

$flak88_ex1 thread axis_win_timer
thread allies_win_bomb

thread bomb1_exploded $flak88_ex1
thread bomb2_exploded $flak88_ex2

end

//*** --------------------------------------------
//*** "Axis Victory"
//*** --------------------------------------------

axis_win_timer:

level waittill axiswin

end

//*** --------------------------------------------
//*** "Allied Victory"
//*** --------------------------------------------

allies_win_bomb:

while(level.targets_destroyed < level.targets_to_destroy)
waitframe

teamwin allies
end

//*** --------------------------------------------
//*** "Bomb 1 Exploded"
//*** --------------------------------------------

bomb1_exploded local.bomb1:

while (local.bomb1.exploded != 1)

wait .1

iprintlnbold "Allies have destroyed the Western Cannon!"


end


//*** --------------------------------------------
//*** "Bomb 2 Exploded"
//*** --------------------------------------------

bomb2_exploded local.bomb2:

while (local.bomb2.exploded != 1)

wait .1

iprintlnbold "Allies have destroyed the Eastern Cannon!"


end

//----------------------------------------------

roundbasedthread:

level waitTill prespawn

level waittill spawn

level.dmrespawning = 0
level.dmroundlimit = 5
level.clockside = kills

level waittill roundstart

end
7th Es Cyborg
First Lieutenant
Posts: 189
Joined: Fri Dec 13, 2002 5:00 pm
Location: PA
Contact:

Post by 7th Es Cyborg »

nevermind, with Cpt Pennybag's help and a typo fix I got it working
User avatar
PsychoE
Captain
Posts: 243
Joined: Mon Oct 21, 2002 7:40 pm

Post by PsychoE »

can anyone explain what this line means from the above script?

level.clockside = axis // set to axis, allies, kills, or draw
User avatar
mohaa_rox
Field Marshal
Posts: 2760
Joined: Mon Nov 11, 2002 7:05 am
Contact:

Post by mohaa_rox »

I think it's too show that the axis are the defending team. Dunno. Don't map MP maps.
Live to map, not map to live.
-mohaa_rox, .map
moderator
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

It sets the team that wins when the timelimit is hit.
Image
User avatar
PsychoE
Captain
Posts: 243
Joined: Mon Oct 21, 2002 7:40 pm

Post by PsychoE »

sounds good to me. thx all.
Post Reply