Showing spline paths


(G0-Gerbil) #1

The plot spline plugin works on goldrush, but not for my own map.

All I’ve got is a bunch of info_train_spline_mains connected, with the odd control point on curves.

But no show - is there a specific naming convention or some such stuff to make the plot spline plugin recognise and draw my path?

Curves won’t be very smooth if I can’t visualise them :frowning:


(G0-Gerbil) #2

Ignore me - they are showing now.

I think it’s because earlier I’d got some info_train_spline_mains that weren’t targetted to anything - I’d just laid them out in their positions before I went tediously through them joining them up.

Looks like they all must be part of the chain, else the plugin won’t draw nowt.


(G0-Gerbil) #3

BTW a nice feature to add for splines would be the ability to select two connected spline points and press a button that automatically adds a control point where the lines from the previous and next spline joins meet.

This would automatically give you smooth curves, IE the ‘perfect’ location for the control point.


(digibob) #4

AFAIK, the console will list any reasons as to why it didn’t draw any paths, missing targets being one of those cases.


(G0-Gerbil) #5

Ah cool, didn’t occur to me to look there so cheers :slight_smile:
It’s all working fine now, so working on the scripting to get the bloody tank up the ramp.

BTW which poor bastard at SD had to copy and paste hundreds of tank / truck path routines eh? :slight_smile:


(digibob) #6

Me. And that was the GOOD version of the script, you should have seen earlier revisions :wink:


(G0-Gerbil) #7

I can see this as goldrush got developed:

Mapper - Hey, I’ve updated the map a bit, new route for the tank!
djbob - You what? How many new bloody spline points you added?
Mapper - Only about 50, not a problem is it?
djbob - mumble grumble
Mapper - Oh, by the way, I’m thinking of putting a truck in to.
sounds of mapper being attacked with mouse and keyboard

djbob - Oh, ok, I’ll do the bloody truck
Mapper - Forgot to mention, we’ve got these two other cool maps in progress, railgun and fueldump - the scripts shouldn’t take long on them.
mapper runs for cover

:smiley:

If I’d had to do those maps, I’d have started out with nice small steps for the script to work on, but by the end the spline points would be half the map apart from each other.


(digibob) #8

Actually i placed most of the spline paths too originally… :moo: Nakedape and Sock ( and possibly some of the other guys ) did later tweakings to make things look more natural, fit better with stuff. Sock did all the broken wall sections in Goldrush for example.

If i’d know the system was going to be used in the way it is now, i would have designed it with the ability to halt the mover midway through movement, and allow restarting in either direction, alas, it was not to be.


(G0-Gerbil) #9

Can’t really complain, it does what it needs to, and small gaps between splines allows for a smooth enough ride.

Plus, copying and pasting your code and using it all I’ve gone from no tank experience to working tank in about half an hour.
Although possibly I shouldn’t have copied and pasted from both goldrush AND fueldump - when the tank gets destroyed some parts of it sink into the ground :slight_smile:

Now, is it possible to have a truck that both teams can drive (each in 1 direction), both teams can destroy, and both teams can repair?

For one of my maps I want a truck you have to drive onto a train track to crash a train. Depending on where the truck is, it’s a tactical advantage for one or the other of the team to destroy it.

I don’t ask for much :smiley:


(hummer) #10

My only beef with the spline system is getting the truck to look as though it driving over the terrain realistically. I end up with places where the truck will dip a “foot” or so into the terrain and such… I can’t seem to get the splines just right :confused:

Has anyone run into this? Esp. with the truck since the origin is at the rear of the model…

I guess the solution would be to not have such varied terrain…


(G0-Gerbil) #11

Yeah am encountering this too, eg where the tank starts going up the main ramp.

What I’m doing is simply smoothing the route off around the area with control points, so the front starts to go up as it gets nearer etc.
I’d rather it was slightly hovering (which is hard to tell) than cutting massively into the terrain.

It’s a bit hit and miss, and I must admit I’ll be tweaking my terrain to flatten it out (since you can’t have the tank / truck at a sideways angle), which is a bit of a pain, but it should all work out reasonably alright in the end.

Only real problem at the moment is when the tank reaches the end of the splines, it ends up pointing vertically into the floor :smiley:


(rgoer) #12

But don’t you know? That’s what tanks do in real life when they reach their spline’s end. “What? I’ve no more to my spline? Well, fuck all, I must bury myself in the earth… preferably vertically and face-first.”


(sock) #13

Luckly railgun had a very flat path route, but goldrush and fueldump needed some extra loving care. Use the bank and roll features of the spline path system. Check the goldrush/fueldump script for examples.

Sock
:moo:

PS. I know I need to explain this in greater depth but the clock is against me.


(Mean Mr. Mustard) #14

It’s possible, but a really painstaking process (as you know). Use lots of control points to get the proper pitch angle. Try cresting a hill - what a pain in the arse! It is counterintuitive since the origin is at the back.

Also, use the followspline ‘roll angle’ parameter.


(G0-Gerbil) #15

Didn;'t know about the roll / pitch stuff. Poring over the goldrush / fueldump scripts is no small feat (I know cos I did it several times last night :/). Does anyone have an example of using the roll / pitch parameters?


(Mean Mr. Mustard) #16

There is no ‘pitch’ parameter in the followspline command - life would be so much easier if there was…

To get the proper pitch, you have to use a series of ‘info_train_spline_control’ points. I’ve used 2-3 on segments. If you place a control point below the spline path, it’ll pitch the front of the truck up (but also lowers the origin…) Conversely, placing a control point above the spline path will pitch the truck front end down. (I’m not sure where the origin of the tank is, but the truck origin is in the back, so the above statements are valid). The ‘plot path’ bobtoolz incorporates control points also, so you can see the effect.

followspline 0 truck_sp2 100 wait length 304  roll 8 -2 dampout

The roll parameter is the ‘roll 8 -2 dampout’. The 8 is the initial roll angle (the angle at the spart of the current spline point). The -2 is how many degrees to roll along the current spline path. Then there is a dampout or dampin (or just leave that parameter off). Not sure what is does, but I suspect it controls the roll ‘path’ instead of just being linear from 8 to 6. The next spline point needs to have an initial roll angle of 6 or you’ll get a ‘jump’ in roll angles.

Hope this helps. You can also get ‘yaw’ if you use control points in the plane of the spline path


(Moonkey) #17

Would it be possible to piggyback (target?) the tank on another script_mover with a better suited origin?