Page 1 of 1
Help fixing plane bomb.
Posted: Tue Jul 06, 2004 9:32 pm
by strafer
I created a few planes on Southern France and they work fine. After their first run they bomb all the targets. On the second and however many runs it will do in the timelimit, it doesn't drop any bombs. It just flies by. Is there a certain script that I have to put in to make it drop a bomb every time?
Posted: Tue Jul 06, 2004 9:56 pm
by nuggets
post your current script
Posted: Tue Jul 06, 2004 10:19 pm
by strafer
I left out the other 2 planes and the speakers. This is just one of the planes.
plane:
// Plane 1 p47 coming from west and bombing the axis bridge
spawn script_object "targetname" "p1l1" "classname" "info_splinepath"
$p1l1.origin = ( 180 -519 1233 )
$p1l1.angles = ( 53 90 0 )
$p1l1.model = "vehicles/p47fly.tik"
spawn script_origin "targetname" "p1l2" "classname" "info_splinepath"
$p1l2.origin = ( 167 191 743 )
$p1l2.angles = ( 0 90 0 )
$p1l2.model = "vehicles/p47fly.tik"
spawn script_origin "targetname" "p1l3" "classname" "info_splinepath"
$p1l3.origin = ( 216 991 1255 )
$p1l3.angles = ( -26 90 0 )
$p1l3.model = "vehicles/p47fly.tik"
spawn script_origin "targetname" "p1l4" "classname" "info_splinepath"
$p1l4.origin = ( 372 4160 1703 )
$p1l4.angles = ( 2 90 0 )
$p1l4.model = "vehicles/p47fly.tik"
spawn script_object "targetname" "bomberpath" "classname" "info_splinepath" "target" $p1l1 "origin" "232 -2582 3172" "angles" "57 90 0" "model" "vehicles/p47fly.tik" "$mdl" "vehicles/p47fly.tik" "#set" "1" "speed" ".8"
// Plane 1 bomb
spawn script_origin "targetname" "p1b1o1" "classname" "info_splinepath"
$p1b1o1.origin = ( 154 298 775)
$p1b1o1.model = "ammo/us_bomb.tik"
spawn script_origin "targetname" "p1b1o2" "classname" "info_splinepath"
$p1b1o2.origin = ( 121 502 419)
$p1b1o2.model = "ammo/us_bomb.tik"
spawn script_object "targetname" "bomber" "classname" "info_splinepath" "origin" $p1l2.origin "#set" "1" "model" "ammo/us_bomb.tik" "$md1" "ammo/us_bomb.tik" "target" $p1b1o1
$p1b1o1.target = $p1b1o2
// Set plane's paths
$p1l1.target = $p1l2
$p1l2.target = $p1l3
$p1l3.target = $p1l4
$p2l1.target = $p2l2
$p2l2.target = $p2l3
$p2l3.target = $p2l4
$p2l4.target = $p2l5
$p2l5.target = $p2l6
$p2l6.target = $p2l7
$p2l7.target = $p2l8
$p2l8.target = $p2l9
$p3l1.target = $p3l2
$p3l2.target = $p3l3
$p3l3.target = $p3l4
$p3l4.target = $p3l5
$p3l5.target = $p3l6
$p3l6.target = $p3l7
// $p3l6a.target = $p3l7
$p3l7.target = $p3l8
exec global/bomber.scr
wait 20
thread plane3
thread global/bomber.scr::bomb 3
local.order = randomint(2)
if (local.order ==1)
{
bombor1:
local.planewait = randomint (0) + 40
wait local.planewait
thread global/bomber.scr::bomb 1
local.planewait = randomint (0) + 40
wait local.planewait
thread global/bomber.scr::bomb 2
goto bombor1
}
else
{
if (local.order ==2)
{
bombor2:
local.planewait = randomint (0) + 40
wait local.planewait
thread global/bomber.scr::bomb 2
local.planewait = randomint (0) + 40
wait local.planewait
thread global/bomber.scr::bomb 1
goto bombor2
}
}
end
[/quote]
Posted: Tue Jul 06, 2004 10:42 pm
by lizardkid
2 things, exec global/bomber.scr ought to be at top of code, and do you need to spawn all those paths over again each time?
Posted: Tue Jul 06, 2004 10:58 pm
by strafer
it doesnt load the paths more than once.
whats the difference if its at the top of the page rather than down where i have it?
Posted: Wed Jul 07, 2004 6:23 pm
by strafer
Anybody know the answer?
Posted: Wed Jul 07, 2004 6:39 pm
by strafer
Oh, and also, if anyone knows how to make the plane do a full turn please post it. I have tried by using the angles, but it goes upside down then goes back in the same direction, then upside down in the opposite direction.
Posted: Thu Jul 08, 2004 8:30 am
by bdbodger
Try spawning your path like this
local.org2 = spawn info_splinepath "targetname" "node2"
local.org2.origin = ( 3365 -3433 980 )
local.org2.angles = ( 30 93 0 )
Posted: Thu Jul 08, 2004 9:23 pm
by strafer
So you are saying to do that instead of?:
spawn script_object "targetname" "p1l1" "classname" "info_splinepath"
$p1l1.origin = ( 180 -519 1233 )
$p1l1.angles = ( 53 90 0 )
$p1l1.model = "vehicles/p47fly.tik"
Posted: Thu Jul 08, 2004 10:48 pm
by bdbodger
Yes I am saying you can spawn info_splinepath nodes you don't need to spawn a script_object and it may work but the flying commands use info_splinepath nodes for angles and speed . If you want to try a different script other than the bomber script you can try my global/strafe2.scr it does bombing a bit different and has strafeing guns . For the way you are doing it now try puting your script after level waittill spawn . I have found somethings need to be after that in order to work on the second round .
Posted: Fri Jul 09, 2004 4:41 pm
by strafer
I'm trying to use your strafe2.scr files and followed the indtructions in the file. Whenever I go into the game to test if it worked, I get spammed with error messages in the console and they are scripts in the .scr file. Maybe you can figure it out if it's my scripting in the map file.
// Plane 1
local.org1 = spawn info_splinepath "targetname" "node1"
local.org1.origin = ( 180 -519 1233 )
local.org1.angles = ( 53 90 0 )
local.org1.model = "vehicles/p47fly.tik"
local.org2 = spawn info_splinepath "targetname" "node2"
local.org2.origin = ( 167 191 743 )
local.org2.angles = ( 0 90 0 )
local.org2.model = "vehicles/p47fly.tik"
local.org3 = spawn info_splinepath "targetname" "node3"
local.org3.origin = ( 216 991 1255 )
local.org3.angles = ( -26 90 0 )
local.org3.model = "vehicles/p47fly.tik"
local.org4 = spawn info_splinepath "targetname" "node4"
local.org4.origin = ( 372 4160 1703 )
local.org4.angles = ( 2 90 0 )
local.org4.model = "vehicles/p47fly.tik"
spawn script_object "targetname" "strafe_path" "classname" "info_splinepath"
$strafe_path.origin = ( 232 -2582 3172 )
$strafe_path.angles = ( 57 90 0 )
$strafe_path.model = "vehicles/p47fly.tik"
$strafe_path.mdl = "vehicles/p47fly.tik"
$strafe_path.set = 1
$strafe_path.speed = 1
$strafe_path.target = $node1
$strafe_path.guns = 1
$strafe_path.diebounce = 1
$strafe_path.bomb = 1
spawn script_object "targetname" "bomberspeaker" "classname" "sound_speaker" "origin" $node3.origin "#set" "1"
spawn script_origin "targetname" "p1b1o1" "classname" "info_splinepath"
$p1b1o1.origin = ( 154 298 775)
$p1b1o1.model = "ammo/us_bomb.tik"
spawn script_origin "targetname" "p1b1o2" "classname" "info_splinepath"
$p1b1o2.origin = ( 121 502 419)
$p1b1o2.model = "ammo/us_bomb.tik"
// Plane 1 bomb 1
spawn script_object "targetname" "bomber" "classname" "info_splinepath" "origin" $node2.origin "#set" "1" "model" "ammo/us_bomb.tik" "$mdl" "ammo/us_bomb.tik" "target" $p1b1o1
$p1b1o1.target = $p1b1o2
// Set plane's paths
$node1.target = $node2
$node2.target = $node3
$node3.target = $node4
bombor1:
local.planewait = randomint (0) + 40
wait local.planewait
thread global/strafe2.scr::strafe 1
goto bombor1
end
Posted: Fri Jul 09, 2004 5:15 pm
by strafer
Oh and also, do planes explode when they hit buildings or the ground in the strafe2.scr file?