Post your scripting questions / solutions here
Moderator: Moderators
TheShiznaeSpe
Major
Posts: 304 Joined: Wed Feb 05, 2003 11:45 pm
Location: US
Contact:
Post
by TheShiznaeSpe » Tue Feb 11, 2003 12:08 am
in this script, i'm trying to get walls to explode
i'm using the setthread command on the triggers so that it starts up the exploding scripts-everything works even, except that when it says the bomb should have gone off-it hasn't
-the bomb removes and everything, but the walls don't blow
any ideas?
Code: Select all
//Title: Fort Vaux
// Architecture: TheShiznaeSpe
// Scripting: TheShiznaeSpe
main:
setcvar "g_obj_alliedtext1" "Protect the bunker"
setcvar "g_obj_alliedtext2" "and"
setcvar "g_obj_alliedtext3" "protect the fort."
setcvar "g_obj_axistext1" "Blow the walls"
setcvar "g_obj_axistext2" "and"
setcvar "g_obj_axistext3" "infiltrate the bunker."
setcvar "g_scoreboardpic" "none"
level waittill prespawn
exec global/ambient.scr MP_Malta_DM
end
level waittill spawn
level.script = maps/obj/Fort_Vaux.scr
//level waittill roundstart //comment out for testing
level.dmrespawning = 1
level.dmroundlimit = 20
level.clockside = allies
thread german_victory
thread french_victory
explode_gate:
iprintlnbold_noloc "Bomb has been set, the main gate will blow in 5 seconds..."
wait 1
iprintlnbold_noloc "4"
wait 1
iprintlnbold_noloc "3"
wait 1
iprintlnbold_noloc "2"
wait 1
iprintlnbold_noloc "1"
wait 1
exec global/exploder.scr::explode 1
iprintlnbold_noloc "Gate blown!"
$gatebomb remove
end
explode_wall_back:
iprintlnbold_noloc "Bomb has been set, the back wall will blow in 5 seconds..."
wait 1
iprintlnbold_noloc "4"
wait 1
iprintlnbold_noloc "3"
wait 1
iprintlnbold_noloc "2"
wait 1
iprintlnbold_noloc "1"
wait 1
exec global/exploder.scr::explode 2
iprintlnbold_noloc "There goes the back wall!"
$backbomb remove
end
explode_wall_side:
iprintlnbold_noloc "Bomb has been set, the side wall will blow in 5 seconds..."
wait 1
iprintlnbold_noloc "4"
wait 1
iprintlnbold_noloc "3"
wait 1
iprintlnbold_noloc "2"
wait 1
iprintlnbold_noloc "1"
wait 1
exec global/exploder.scr::explode 3
iprintlnbold_noloc "CHARGE, THE FLANK IS EXPOSED!"
$sidebomb remove
end
german_victory:
$bunker_trigger waittill trigger
while(1)
{
self waittill trigger
local.triggerer = parm.other
if(local.triggerer.dmteam == "axis")
break
wait 0.1
}
iprintlnbold_noloc "The Germans have infiltrated the bunker!"
teamwin axis
end
french_victory:
level waittill allieswin
iprintlnbold_noloc "The German offensive has been impeded!"
end
mohaa_rox
Field Marshal
Posts: 2760 Joined: Mon Nov 11, 2002 7:05 am
Contact:
Post
by mohaa_rox » Tue Feb 11, 2003 1:59 am
Did you set your wall as a script object with #set xx and the destroyed one with a script objective #set xx? And an fx will do good too.
Live to map, not map to live.
-mohaa_rox, .map
moderator
TheShiznaeSpe
Major
Posts: 304 Joined: Wed Feb 05, 2003 11:45 pm
Location: US
Contact:
Post
by TheShiznaeSpe » Tue Feb 11, 2003 3:04 am
ya, i'll email ya the map file tomorrow
mohaa_rox
Field Marshal
Posts: 2760 Joined: Mon Nov 11, 2002 7:05 am
Contact:
Post
by mohaa_rox » Tue Feb 11, 2003 3:11 am
Cool. For the TC?
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 » Tue Feb 11, 2003 7:12 am
Make sure you don't have a script_model (targetname exploderfire) without a model anywhere
.
TheShiznaeSpe
Major
Posts: 304 Joined: Wed Feb 05, 2003 11:45 pm
Location: US
Contact:
Post
by TheShiznaeSpe » Wed Feb 12, 2003 12:51 pm
nope, i double checked the models, but still no explosion
is the script ok?
jv_map
Site Admin
Posts: 6521 Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:
Post
by jv_map » Wed Feb 12, 2003 4:40 pm
I really don't understand why you typed an 'end' in the middle of your main thread
.
TheShiznaeSpe
Major
Posts: 304 Joined: Wed Feb 05, 2003 11:45 pm
Location: US
Contact:
Post
by TheShiznaeSpe » Thu Feb 13, 2003 10:39 pm
aha! it's from an earlier script to injure players in a radius, i'll test later
mohaa_rox
Field Marshal
Posts: 2760 Joined: Mon Nov 11, 2002 7:05 am
Contact:
Post
by mohaa_rox » Thu Feb 20, 2003 1:19 pm
Code: Select all
//Title: Fort Vaux
// Architecture: TheShiznaeSpe
// Scripting: TheShiznaeSpe
main:
setcvar "g_obj_alliedtext1" "Protect the bunker"
setcvar "g_obj_alliedtext2" "and"
setcvar "g_obj_alliedtext3" "protect the fort."
setcvar "g_obj_axistext1" "Blow the walls"
setcvar "g_obj_axistext2" "and"
setcvar "g_obj_axistext3" "infiltrate the bunker."
setcvar "g_scoreboardpic" "none"
level waittill prespawn
exec global/ambient.scr MP_Malta_DM
end
level waittill spawn
level.script = maps/obj/Fort_Vaux.scr
//level waittill roundstart //comment out for testing
level.dmrespawning = 1
level.dmroundlimit = 20
level.clockside = allies
thread german_victory
thread french_victory
explode_gate:
[color=red]$triggername1 waitthread global/exploder.scr::explode 1[/color] // where $triggername1 is your trigger name
iprintlnbold_noloc "Bomb has been set, the main gate will blow in 5 seconds..."
wait 1
iprintlnbold_noloc "4"
wait 1
iprintlnbold_noloc "3"
wait 1
iprintlnbold_noloc "2"
wait 1
iprintlnbold_noloc "1"
wait 1
exec global/exploder.scr::explode 1
iprintlnbold_noloc "Gate blown!"
$gatebomb remove
end
explode_wall_back:
iprintlnbold_noloc "Bomb has been set, the back wall will blow in 5 seconds..."
wait 1
iprintlnbold_noloc "4"
wait 1
iprintlnbold_noloc "3"
wait 1
iprintlnbold_noloc "2"
wait 1
iprintlnbold_noloc "1"
wait 1
exec global/exploder.scr::explode 2
iprintlnbold_noloc "There goes the back wall!"
$backbomb remove
end
explode_wall_side:
iprintlnbold_noloc "Bomb has been set, the side wall will blow in 5 seconds..."
wait 1
iprintlnbold_noloc "4"
wait 1
iprintlnbold_noloc "3"
wait 1
iprintlnbold_noloc "2"
wait 1
iprintlnbold_noloc "1"
wait 1
exec global/exploder.scr::explode 3
iprintlnbold_noloc "CHARGE, THE FLANK IS EXPOSED!"
$sidebomb remove
end
german_victory:
$bunker_trigger waittill trigger
while(1)
{
self waittill trigger
local.triggerer = parm.other
if(local.triggerer.dmteam == "axis")
break
wait 0.1
}
iprintlnbold_noloc "The Germans have infiltrated the bunker!"
teamwin axis
end
french_victory:
level waittill allieswin
iprintlnbold_noloc "The German offensive has been impeded!"
end
Add the same for the rest. If it's wrong, check the tuts on bombing, @ Nemesis' page or Bjarne.
Live to map, not map to live.
-mohaa_rox, .map
moderator
TheShiznaeSpe
Major
Posts: 304 Joined: Wed Feb 05, 2003 11:45 pm
Location: US
Contact:
Post
by TheShiznaeSpe » Thu Feb 20, 2003 11:10 pm
the problem is not that the thread doesn't start, it's that after the script counts down, the bomb just doesn't explode
Bjarne BZR
Site Admin
Posts: 3298 Joined: Wed Feb 05, 2003 2:04 pm
Location: Sweden
Contact:
Post
by Bjarne BZR » Thu Feb 20, 2003 11:36 pm
If you look in the file
obj_dm.scr ( In global in pak0.pk3 ) and the method
bomb_explode: you will see that the standard behaviour of calling:
Code: Select all
$bomb_targetname thread global/obj_dm.scr::bomb_thinker of an exlosion does more than just
look in the file to see how its done...
( I really dont know but this is my guess. Slap me if I'm barking up the wrong tree here... )
Admin .MAP Forums
Head above heels.
TheShiznaeSpe
Major
Posts: 304 Joined: Wed Feb 05, 2003 11:45 pm
Location: US
Contact:
Post
by TheShiznaeSpe » Fri Feb 21, 2003 3:38 am
this isn't a bomb thinker for an obj, it's just a bomb that can be set (not defused) and it blows the wall
mohaa_rox
Field Marshal
Posts: 2760 Joined: Mon Nov 11, 2002 7:05 am
Contact:
Post
by mohaa_rox » Fri Feb 21, 2003 6:22 am
Did you set the correct stuff for the bomb? Give me the map, I'll take a look. Don't worry, I'm in the same mod as you.
Live to map, not map to live.
-mohaa_rox, .map
moderator
mohaa_rox
Field Marshal
Posts: 2760 Joined: Mon Nov 11, 2002 7:05 am
Contact:
Post
by mohaa_rox » Sat Feb 22, 2003 3:40 am
I'll try my old bombing trick and see.
Live to map, not map to live.
-mohaa_rox, .map
moderator