Page 1 of 2

RotateX/Y/Z and move forward

Posted: Thu Jun 30, 2005 6:17 pm
by Runt
Hey,

I want an object moving forward and rotateX/Y/Z at the same time.
Maybe with a while loop ?
Thanks

Posted: Thu Jun 30, 2005 6:35 pm
by Elgan
well i would mess with angles myself.

but you can use movexup etc like so

Code: Select all



$object moveup 32
$object move
$object movexup 77
$object waitmove

iprintln "finished mooving both"


Posted: Thu Jun 30, 2005 7:06 pm
by ViPER
i've seen this used -


$object moveEast 800
$object rotateYdownto 180
$object waitmove


What sets the speed to move object?

Posted: Thu Jun 30, 2005 7:25 pm
by Rookie One.pl
You can issue a few move commands at a time and activate them with one waitmove, I mean like this:

Code: Select all

self moveNorth 16
self moveWest 16
self moveDown 16
self waitmove
Self will start moving diagonally north-west-down at the moment when the waitmove command is issued.

@Viper:

Code: Select all

local.object speed 150
Will set local.object's speed to 150 units per second.

Posted: Thu Jun 30, 2005 7:53 pm
by Runt
Thankyou all

Code: Select all

$object moveto $waypoint1 
$object rotateYdownto 180 
$object waitmove 
or

Code: Select all

self moveto $waypoint1 
self moveWest 16 
self moveDown 16 
self waitmove
This is also possible ?

Posted: Fri Jul 01, 2005 1:56 am
by Green Beret
I would use

$object moveto $waypoint1
$object rotateYdownto 180
$object waitmove

Posted: Fri Jul 01, 2005 6:28 am
by ViPER
Another ? on this.

Is there a way to set the speed of rotation seperate from speed of movement?

Posted: Fri Jul 01, 2005 7:07 am
by Rookie One.pl
It's a parameter of the rotate command. Look in g_allclasses.html, it's all there.

Posted: Fri Jul 01, 2005 9:05 am
by HDL_CinC_Dragon
using yaw and rotation is also great for making a truck like leaning over a cliff and on fire or something like that. I used it once for a truck on its side halfway on a slightly elevated terrain and half on a lower terrain whie one fire. Turned out nice :)

Posted: Fri Jul 01, 2005 12:00 pm
by bdbodger
You can set time I think on rotation . $object rotateYdownto 180 is absolute it rotates down to 180 but if you just did $object rotatey ? the ? would be degrees per second I belive . $object rotatey 360 would rotate y once per second to stop it you would have to do $object rotatey 0

Posted: Fri Jul 01, 2005 4:16 pm
by Green Beret
$object time 3
$object moveto $waypoint1
$object rotateYdownto 180
$object waitmove

$object time 3 is how long itll take to move, so they lesser the number the faster :wink:

Posted: Sat Jul 02, 2005 8:06 am
by bdbodger
My rule of thumb is speed for movement time for rotation .

Posted: Sat Jul 02, 2005 2:03 pm
by Runt
When I use this:

Code: Select all

test:
$test moveto $waypoint1 
$test rotateYdownto 180 
$test waitmove 
I get this in console:

Code: Select all

Error, no script should be loaded before loadout.scr
:? :?

And when I apply this script to an object :

Image

Posted: Sat Jul 02, 2005 6:55 pm
by lizardkid
your $bathallied entity isn't being read correctly. does it exist? spell the targetname right?

the loadout.scr thing, you can't exec stuff before main.

Posted: Sat Jul 02, 2005 7:52 pm
by Runt
does it exist? spell the targetname right?
Yes, Yes.

If I make a brush into a script object and give it a targetname "test" it does work. But when I give an object a targetname of "test" I get the NULL listener error :? :(