Help fixing plane bomb.

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
strafer
Captain
Posts: 237
Joined: Sat Jan 31, 2004 11:29 pm
Location: The Motherland..
Contact:

Help fixing plane bomb.

Post 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?
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 »

post your current script
hope this helps, prob not cos it's all foreign 2 me :-/
strafer
Captain
Posts: 237
Joined: Sat Jan 31, 2004 11:29 pm
Location: The Motherland..
Contact:

Post 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]
Last edited by strafer on Thu Jul 08, 2004 12:31 am, edited 1 time in total.
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

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

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
strafer
Captain
Posts: 237
Joined: Sat Jan 31, 2004 11:29 pm
Location: The Motherland..
Contact:

Post 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?
strafer
Captain
Posts: 237
Joined: Sat Jan 31, 2004 11:29 pm
Location: The Motherland..
Contact:

Post by strafer »

Anybody know the answer?
strafer
Captain
Posts: 237
Joined: Sat Jan 31, 2004 11:29 pm
Location: The Motherland..
Contact:

Post 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.
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post 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 )
Image
strafer
Captain
Posts: 237
Joined: Sat Jan 31, 2004 11:29 pm
Location: The Motherland..
Contact:

Post 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"
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post 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 .
Image
strafer
Captain
Posts: 237
Joined: Sat Jan 31, 2004 11:29 pm
Location: The Motherland..
Contact:

Post 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
strafer
Captain
Posts: 237
Joined: Sat Jan 31, 2004 11:29 pm
Location: The Motherland..
Contact:

Post by strafer »

Oh and also, do planes explode when they hit buildings or the ground in the strafe2.scr file?
Post Reply