gotomarker while rotating?


(S14Y3R) #1

Hi, could somebody please elaborate on this?:

gotomarker <targetname> <speed> [accel/deccel] [turntotarget] [wait] [relative <position>]

I know the basic gotomarker marker 100 wait, but I’m trying to give a chunk of debris a spin as it flies through the air, instead of just going there. Using a spline path and control splines looked better(arcing), but using setrotation and/or faceangles to spin it didn’t work. it would execute the faceangles/then execute the follow path, or vice versa. So how do I use the [turntotarget]? thnx in advance.

Loffy- Posted: Nov 03, 2005 - 07:38 AM


Hi!
I would try:
a) get the piece rotating
b) then move it thru the air, and
c) then let it land and stop its rotation.

Script
setrotation 50 100 100 // or whatever
gotomarker <targetname> <speed> [wait]
stoprotation

Maybe it would work?
//L.

S14Y3R-Posted: Nov 04, 2005 - 04:25 AM


D’oh! Sorry, posted in wrong forum.

Yeah Loffy, I set it up like:

setrotation 90 50 50
gotomarker path2 250 wait
setrotation 0 0 0

That didn’t work, the setrotation didn’t call at all, so I tried:

faceangles 180 180 180 250 //no wait! k, then
gotomarker path2 250 wait

But the gotomarker only runs after the faceangles has finished rotating, like it rotates first then moves. Its kinda weird 'cause it’ll move in place and then fly off, instead of rotating while flying… heh heh. I dunno, I’ve tried faceangles and setrotation on a spline path too but it does the same thing. So is the turntotarget (in gotomarker) a degree variable? eg. “gotomarker path2 250 360 wait” a full rotation? Or do I still need an accel/deccel variable for it to work? So far the best luck I’ve had is with the spline controls to give it a nice arc.

I’ll repost in ET Level design forum
:beer:


(EB) #2

gotomarker <targetname> <speed> [accel/deccel] [turntotarget] [wait]

This will tell the SCRIPT_MOVER to move to a target, usually a Path_corner.
Targetname is “name” of the PATH_CORNER…
SPEED is used for how fast the SCRIPT_MOVER will move to the PATH_CORNER…
ACCEL/DECCEL are used to accelerate/deccelerate to a PATH_CORNER. (NOTE: For ACCEL, the SCRIPT_MOVER needs to start at speed of 0, and DECCEL needs to end at a speed of 0)…
TURNTOTARGET will face towards the targer (PATH_CORNER) depending on the angle…
WAIT is used so that the script will not read ahead until the SCRIPT_MOVER has reached the TARGETNAME.

If your debris is pausing at a PATH it is due to your WAIT setting… I would not utilize any WAIT commands in a ‘debris dispersement’. I would just set the speed and rotation to reflect the natural feel of the situation…(meaning I would ‘toy’ with it until right.)
If you explain better or post a pic of the setup in radiant…I could help you further.

Here is a helpful Simland link > http://www.planetquake.com/simland/ldr1_1/appendix_a.htm


(S14Y3R) #3

there’s only the one path (or spline) I need to rotate on( :disgust: ), the wait’s there so it doesn’t stop rotating until it stops moving. Otherwise it stops rotating right away. This is the debris after the fact As you can see I’ve concentrated more on the script than the mapobjects(for now). K, the fuel tank in its original position gets dynomited by the allied team. It then flies into the tree(breaking it), riccochettes off the tree and smashes an opening in the wall. Meanwhile the tree’s falling over and it smashes another section of the wall. Two for the price of one. The fueltank itself consists of two scriptmovers. One with no *“jet of fire” shooting out the back, and one without “jet of fire” for static display. What I’m trying to do is get the flying tank to rotate around its own z axis(relative to origin of entity) while on its way to smash the wall. It does work the way it is, alertentity this/'n that explosion, rubble, a couple sound effects… I just want to add a little “more”, keeping the visuals true to life, know what I mean? Maybe I’m just overcomplicating things but I tend to do that.

btw: those are very old screenshots in that album. Allow for Noob Factor% The Object of the map is to get an armored train(undamagable) to the underground crane, *“a player operates the crane” to load the part onto the train. Allies can revert the crane to its previous position. While in transit the first crane causes an explosion(acetylene tanks in the way) which destroyes the trains engine armor. Now the train is damagable for the way back. heh heh, there’s a couple of track switches in the way of the second crane in the trainyard. when they get there the second crane must be operated from the crane’s nest(view from top of arm) Ever play UT '04? While I was playing the demo and realized I could do there crane thing in ET. With having to stand in one place, (stationary trigger_multiple, functional script_mover)The shipyard crane is basically a spline_path script_mover with faceangles in stages instead of followspline. Pretty neat.

I’m a little further along now but have yet to do another round of screenshots. this is my first showing of anything, so please remember I’ve spent wayyyy more time on scripting than making things look pretty.

:banana: be kind!

*jet of fire=cone mapped with fire attached to back of fueltank2, for jet engine effect


(Loffy) #4

In the LOTR map (helms deep), there is a big wall. That wall is dynamited I think, and there are debris that fly thru the air, if I remember it correctly.
I would take a look at it and check that map’s script for ideas.


(S14Y3R) #5

k, got it working. the way it was:

faceangles 90 90 90 500
gotomarker path_1 100 wait

didn’t work, It would rotate it in place, then move to the path_corner.
So I switched it around to:

gotomarker path_1 100
faceangles 90 90 90 500 wait

and that works fine! It rotates while flying. D’oh! Should’ve tried it that way first.


(sodsm live) #6

S14Y3R, i know this isn’t the main topic but are you controlling the crane with switches and levers from inside the crane as it turns and moves(not sure what crane’s nest means)? what i’m getting at is i’m wondering if you are able to make a script mover attached to another one, or at least have some kind of button or switch attached to a script mover?

i haven’t had luck finding anything in the forums about it unless i’m just not using the right vocabulary in the forum search.

sorry i have nothing to add to your current obstacle. any help would be appreciated.


(EB) #7

http://www.nibsworld.com/rtcw/tutorial_script_mover_part1.shtml

http://www.spyjuice.com/using_paths.htm


(Yojo) #8

i wanna ask a question about this, i got the following script:
alertentity plane2sound1
gotomarker p2step1 500
faceangles 0 180 0 gototime
alertentity plane2sound2
gotomarker p2step2 500
faceangles 0 180 90 gototime
gotomarker p2step3 500
faceangles 0 -270 90 gototime
gotomarker p2step4 500
faceangles 0 -330 65 gototime
gotomarker p2step5 500
faceangles 0 0 0 gototime
gotomarker p2start 500
faceangles 0 180 0 gototime
only problem, the plane is turning and turning around, but it flies backward and more.
so… i see that the 0 x 0 stays the same, only the x is variable. what does this mean? does this mean the degrees are counted on the currnet position on the plane? (for example, the plane has a angle of 90 in before p2step 1. does that mean the plane will turn to 270 after p2step 1?) or are these the new coordinats???


(Loffy) #9

Good question. I do not know. I found this in the manual


gotomarker <targetname> <speed> [accel/deccel] [turntotarget] [wait] [relative <position>]
    Note: speed may be modified to round the duration to the next 50ms for smooth transitions.

and this


faceangles <pitch> <yaw> <roll> <duration/GOTOTIME> [ACCEL/DECCEL]
    The entity will face the given angles, taking <duration> to get their. If the GOTOTIME is given instead of a timed duration, the duration calculated from the last gotomarker command will be used instead.

//Loffy


(Yojo) #10

heh, if i only would understand what yaw is :confused:


(EB) #11

pitch/yaw/roll = (basically) axial movements on X Y and Z.


(Yojo) #12

and are they based on the current position or are they new poisitions?


(S14Y3R) #13

HI! hey yojo, your faceangles gototime-

alertentity plane2sound1 
gotomarker p2step1 500 
faceangles 0 180 0 gototime

-should be in milliseconds, faceangles 0 180 0 2000 , a gototime of 2000 will take 2 seconds to turn

sodsom

S14Y3R, i know this isn't the main topic but are you controlling the crane with switches and levers from inside the crane as it turns and moves(not sure what crane's nest means)? what i'm getting at is i'm wondering if you are able to make a script mover attached to another one, or at least have some kind of button or switch attached to a script mover? 

Actually, the cranes are moved by means of a trigger_multiple calling a run_prestage(a la tank) and then moving multiple script_movers. My shipyard crane is made up of a main_body, crane_arm, crane_hook, and the cargo in the second half. Along with two trigger_multiples(allies and Axis) that turn to stay in the crane’s nest. A player needs to be in the nest(crane cockpit) for the crane to move. The hook and cargo are on a spline_path, but the crane_base, arm, and trigger_multiple’s are using faceangles in their stages

-I’m not sure about attaching a button to a scriptmover though, I suppose if you scripted a func_invisible_user to move along with your mover?


(sodsm live) #14

EB, if that was meant for me then thanks. i’ve already checked out both of nibs tuts and it didn’t seem to cover it. when i said ‘attached’ i meant physically attached like:

say you are on a moving platform. that platform has a control panel physically on it moving with the platform. the control panel has switches that cause the platform to speed up, slow down, go back to the previous stop, skip the next stop, rotate, etc. I’m not talking about a free roaming vehicle but more like a lift that has the buttons to raise and lower it that go up and down with the lift.

i haven’t had a chance to check out the paths map you provided but will do. sorry if i’m being obtuse but i’m still new to the q3 engine.


(Yojo) #15

heh no slayer, the time is clear for me :wink:
i noticed that gototime copies the time from gotomarker :wink:
anyway thx

my only problem or those - signs, i don’t get it…