followspline command question


(chavo_one) #1

In the documentation it says:

followspline <direction 0(forward)|1(backward)> <splinename> <speed> [wait] 

But in the map scripts there are things like:

followspline 0 spln1 50000 length 32 wait

By my count the argument counts don’t match up. So what are the extra arguments in the script version for?

<direction> = 0
<splinename> = spln1
? = 50000
? = length
<speed> = 32
[wait] = wait


(sock) #2

Yep, its an undocumented feature of the command followspline. The documentation should say …

followspline <direction 0(forward)|1(backward)> <splinename> <speed> [length <turningcircle>][wait] 

The length and wait parameters are optional and can appear in any order at the end of the command as you probably found looking through the scripts. The above example you have found is to move the object very quickly to its initial position.

Sock
:moo: z0r


(chavo_one) #3

Interesting…Thanks Sock!

but the plot thickens :fiesta:
what about these undocumented features? :smiley:

followspline 0 tspln_13 125 wait length 304 wait roll -3 0 dampout

So now I see something about roll and dampening. I can only assume this is for traveling on uneven terrain? I also assume this is undocumented because it would have confused too many people just getting into mapping?

Also, it appears from the example above that you can chain these commands together?! I see a wait, a turn, another wait, a roll, and a dampout.

And another question in a storm of so many…Does [length <turningcircle>]represent a turning circle radius or angle or something entirely else?


(chavo_one) #4

So judging by sock’s comments here–>http://www.splashdamage.com/forums/viewtopic.php?t=2527#20980 I take it that this topic may be justified with some documentation at a later date?

It’s a shame that it is so powerful, yet may go untapped by the majority of mappers. I’ll play around with it and post anything if I find out something.


(sock) #5

I really want to produce something useful about these extra commands, so bear with me and I will get something together soon. The roll / dampin / dampout parameters are not easy to use/understand. This is not some Xfiles conspiracy thing, just different people doing parts of the same documentation.

Sock
:moo: z0r


(chavo_one) #6

Patience is a virtue.
That’s all I needed to hear. I just wanted to be sure this topic wasn’t falling to the pits of the forum unnoticed.


(The_Prog) #7

hope this isn’t too off topic or anything but here’s what I’ve figured out
on the <roll 12 -1><dampin> statements.

roll is like rocking the boat.
12 is the number of degrees to rock the boat.
the -1 is the second param for roll which gives a finishing angle for the
roll.

so if my first roll is 12 and the next spline path entity will be 16

I would use this for teh first roll
roll 12 +4 dampin

why +4 ?
my next entity wants to be at a roll of 16 when it starts so I add 4 degrees
to the previous roll of 12 so that I finish first at 16 degrees and start next roll at 16 degrees. confusing descript here, sorry.
What I’m trying to say is, if you dont add or subtract the difference from one point to the next, your object will snap from 12 degrees to 0 degrees and then start a new roll from 0 to the next angle you want.
I assume the dampin dampout is like the ease to and ease from in most modeling packages using follow path stuff.

I’m thinking that if I used dampin on one of these statements
the roll would be quick up to the roll angle specified, then ease to the finishing angle specified. Fast in, slow out. just a guess . maybe vice versa.

heres some scripts of the truck utilizing the roll <to angle> <finish angle>

trigger run_2
{
accum 1 bitset 2
followspline 0 tspln2 125 wait length 304 wait roll 8 +0
// was +0 because next spline starts at 8 degrees also
accum 1 bitreset 2

accum 3 set 2
trigger truck run_continue
}

trigger run_3
{
accum 1 bitset 2
followspline 0 tspln3 125 wait length 304 wait roll 8 +0
accum 1 bitreset 2

accum 3 set 3
trigger truck run_continue
}

  trigger run_4
{
accum 1 bitset 2
followspline 0 tspln4 125 wait length 304 wait roll 8 +6

// was +6 because next spline starts at 14
accum 1 bitreset 2

accum 3 set 4
trigger truck run_continue
}

trigger run_5
{
accum 1 bitset 2
followspline 0 tspln5 125 wait length 304 wait roll 14 +2
accum 1 bitreset 2

accum 3 set 5
trigger truck run_continue
}


trigger run_6
{
accum 1 bitset 2
followspline 0 tspln6 125 wait length 304 wait roll 16 +5
accum 1 bitreset 2

accum 3 set 6
trigger truck run_continue
}


trigger run_7
{
accum 1 bitset 2
followspline 0 tspln7 125 wait length 304 wait roll 21 +0
accum 1 bitreset 2

accum 3 set 7
trigger truck run_continue
            }

I hope this helps a little, I’m pretty sure I’m correct on the roll since it worked for my needs. I haven’t put the dampins dampouts yet so My suggestion to that was theoretical up to now. :chef:


(The_Prog) #8

have a question too.
It seems that placement of splines take care of <pitch> angle for you.
Am I right?
Is the [length <turningcircle>] mentioned earlier in topic kind of your
<YAW> control?? or is this just a standstill spin in place kind of thing.?

If not, is there a <yaw> <pitch> control within the followspline command.?

Could you explain the [length <turningcircle>] to me.
Is this to spin around a point (origin)while traveling down a path?

length = <duration???>
<turningcircle> angle in degrees up to 360???

Thanks
Clarification would be much appreciated


(damocles) #9

Don’t know for sure, but turning circle is usually used to refer to the circle radius of which to corner.

Kinda fiddly to explain. When a vehicle like a tank or car turns while moving forward, they curl around in a circle. Imagine the centre point of this circle. The point from the start of the turn to the centre of the circle is the turning circle radius. Why this is needed for spline paths I don’t know though :confused: Unless the vehciles don’t turn to follow splines (I haven’t started messing with them yet)


(The_Prog) #10

So if your correct, in effect this would be like a bank method.
In combo with roll you could probably create a convincing flight path for
an airplane and so forth. Helps with the boxiness of square turns, and possibly reduce the number of splinepath entities for smoother curve transitions of a script_mover entity.? Maybe? Sounds good to me. I’ll have
to add the line to some of my move script and see what the effect is now that
i have a visual idea of what it’s supposed to be used for.
So would the actual spline path entity scripted with the turning radius be
the centerpoint of the imaginary circle? Kind of falls in line with 3DMAX follow path. The object doesn’t necessarily cross through the spline vertexes on a curve when banking is turned on.
Thanks for the ideas. :clap:


(sock) #11

That was the original use for the spline path system, but the map using the bombers was shelved. The system was then applied to land based vehicles instead.

Sock
:moo:


(The_Prog) #12

Thanks Sock,
So are our little theories above correct?
I’m going to assume so.
One last thing. Are there any other properties for the followspline not
documented yet? Or have we pretty much covered that here in this thread. For info I’m using all this for very uneven terrain and two trucks.
Thanks again.


(Doc) #13

Any official documentation of extra followspline commands coming anytime soon? Please please please!


(G0-Gerbil) #14

Just thought I’d bump this thread because it just helped me solve some particularly painful tank probs :slight_smile:


(No1_sonuk) #15

Hmm.

I really want to produce something useful about these extra commands, so bear with me and I will get something together soon. The roll / dampin / dampout parameters are not easy to use/understand. This is not some Xfiles conspiracy thing, just different people doing parts of the same documentation.

Any news on this, Sock?


(sock) #16

Its very unlikely I will have much time available in the next couple of months to sort out this request. All I can suggest is at the moment look to the original scripts.

Sock
:moo:


(Chruker) #17

All the information we need are in the G_ScriptAction_FollowSpline function found in the \src\game\g_script_actions.c file. Now we just need to decode it.

I’m looking forward to finding out how the accum and globalaccum keywords can be used with the followspline function.


(Malverik) #18

ouch, i really wish someone would have seen my tank questions before it got burried at the bottom of the page

here it is anyway http://www.splashdamage.com/index.php?name=pnPHPbb2&file=viewtopic&t=8498

I got 1) and 3) figured out but i cant seem to find where the call to “bot_active_check” is going and what it does

Another thing
Is there a way, once in devmap mode in ET to display the trigger_objective_info and the origin brushes to see where they are being positioned around the tank?

Thx


(No1_sonuk) #19

OK. Thanks, Sock.

Temporarily texture them with a visible shader? Maybe using the replace shader commands in the script.


(Chruker) #20

Temporarily texture them with a visible shader? Maybe using the replace shader commands in the script.

I’ve had no success with temporarily using a visible shader. It seems as soon as its a trigger its perm. invisible. I asked Ydnar if there was a way, perhaps a compile option. But I never got an answer.

BTW: Sock, nice new avatar :wink: