Speed Speed Speed

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Speed Speed Speed

Post by bdbodger »

I was looking at speed for a script I am writeing and
had a few things that I was wondering about.

In the bomber.scr they have

if (level.flyplane == NIL)
level.flyplane = 1


if (level.flyplane == 0)
self flypath level.bomberpath[local.i] 1500 2000 256
else
self followpath level.bomberpath[local.i]

Now if you set the speed at the info_splinepath node to .5 the plane

flys at half speed . There must be a default speed for followpath .

if level.flyplane = 0 then the planes fly at a constant speed of 1500 2000 256

regardless of speeds set in the info_splinepath nodes . Of course the flypath

command also has a modifyflypath just like the drive has a modifydrive command

but then for moveing $mything speed 25 is in units per second but that is not true

for followpath . I was just wondering if anyone had any comments about this .
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

I think the default speed for moving objects will be used, which is, I think, 200 units per second.
Image
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

flyplane

Post by tltrude »

I think that thread only runs if you use:

thread global/bomber.scr::flyplane 1

Where as the normal line would be:

thread global/bomber.scr::bomb 1

My guess is that it would be used to make models fly that are not set in the spline path. Or, maybe it is used to add more planes to a single splinepath.

You can also use a targetname "bombertrigger" to set off a plane, but I have no idea which thread the trigger will call. Map m4l0 uses a trigger and it does have "level.flyplane = 1" in the script.
Tom Trude,

Image
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

Well I am working on a global/strafe.scr with bombing as well . I almost have it done . With flypath the airplane does not stick to the info_spline paths because of the way look ahead works . My nodes think so useing that the plane could miss the node . I am useing vector_length for that . and also the plane flys at speeds set by the flypath command <speed> 1500 <acceleration> 200 <lookahead> 256 I would have to use modify fly or whatever it is to change the speed .
With followpath I can set the speed key in the node and have it go faster or slower by setting the node . My script also allows you to reset nodes from script . followpath is definitely the best to work with . If the default is about 200 that will make it easier to use in other maps to guess the aprox . speed . Any way as a preview here is some of the keys in my new script .
//---------------------------------------------------------------------------------------------------
// First info_splinepath node keys ( stored )
//---------------------------------------------------------------------------------------------------

//
// Key:$targetname Value: strafe_path ( not optional )
// Key:#set Value: < integer > ( set each path to a different set # )
// Key:$mdl Value: < model > ( Plane model default vehicles/p47fly.tik)
// Key:angles Value: < x y z > ( pitch roll yaw )
// Key:#gunangle Value: < angle > ( gun pitch angle default 0 )
// Key:#guns Value: < boolean > ( guns on or off (1,0) default 1 on )
// Key:#gunoffset Value: < float > ( optional value for gun offset from center default 70 )
// Key:#damage Value: < integer > ( health when new plane spawned or after plane death default 1000)
// Key:#pause Value: < time > ( optional time to wait after spawn before flying in sec )
//
//---------------------------------------------------------------------------------------------------
// All info_splinepath nodes keys ( read from node )
//---------------------------------------------------------------------------------------------------
//
// Key:$setthread Value: < thread > ( optional level.script thread to run when plane flys over node)
// Key:model Value: < model > ( optional editor model ( editor only ))
// Key:#bombstart Value: < spawn # > ( optional spawn # delay for bombing if #bomb set )
// Key:#bomb Value: < # spawns > ( optional value for bombing every # spawns (after #bombstart if #bombstart set))
// Key:$bombtarget Value: < targetname > ( optional entity targetname for bombing ( is reset to default bombing angles after bombing))
// Key:$bombmodel Value: < model > ( optional model for bomb default ammo/us_bomb.tik )
// Key:bombsound Value: < soundalias > ( optional sound for dropping bomb default drop_bomb )
// Key:bombdamage Value: < float > ( optional bomb damage default 500 )
// Key:bombradius Value: < float > ( optional bomb damage radius default 500 )
// Key:$expmodel Value: < emitter > ( optional explosion model for bombing default models/emitters/explosion_mine)
// Key:#expscale Value: < float > ( optional explosion model scale default 1 )
// Key:$bombthread Value: < thread > ( optional level.script thread to run after bomb explosion )
// Key:#guns Value: < boolean > ( optional value to start/stop guns fireing )
// Key:#gunangle Value: < newangle > ( optional new gun pitch angle )
// Key:speed Value: < float > ( optional new speed setting at node default 1 )
//
//---------------------------------------------------------------------------------------------------
// Level Variables ( stored variables taken from $strafe_path node at level start that can be changed by script )
// ( or reset level.strafenode[set #][1] keys and run global/strafe.scr::plane_setup set# )
//---------------------------------------------------------------------------------------------------
//
// level.strafeplane[local.set][oldhealth] ( health saved between spawns )
// level.strafeplane[local.set][lgunpos] ( stored left gun position for spawned script origin )
// level.strafeplane[local.set][rgunpos] ( stored right gun postion for spawned script ofigin )
// level.strafeplane[local.set][model] ( stored plane model )
// level.strafeplane[local.set][ang] ( stored plane angles )
// level.strafeplane[local.set][org] ( stored $stafe_path origin )
// level.strafeplane[local.set][damage] ( stored plane max health )
// level.strafeplane[local.set][gunangle] ( stored gun pitch angle )
// level.strafeplane[local.set][gunfire] ( stored gun on off variable )
// level.strafeplane[local.set][pause] ( stored plane pause after spawn )
//
//---------------------------------------------------------------------------------------------------
// Level Nodes ( Keys can be changed by script see Keys above )
//---------------------------------------------------------------------------------------------------
//
// level.strafenode[set #][node #].origin ( node origin )
// level.strafenode[set #][node #].angles ( node angles )
// level.strafenode[set #][node #].<key> ( read from node each flight )
// level.startbomb[set #][node # ] ( Stored after node setup can be changed to delay
// bombing or set #bomb Key to NIL to stop bombing )
// level.index[set #] ( counter for startbomb and #bomb key 1 to startbomb then 1 to #bomb )
//
//---------------------------------------------------------------------------------------------------
Post Reply