# Monorail Pathing

Discussion in 'Starcraft 2 (SC2) Editor Help' started by Dave312, May 9, 2010.

1. ### Dave312Censored for your safe viewing

Ratings:
+269 / 0 / -0
So I've been playing around with the editor a bit and I have discovered the monorail track (Doodads -> Track Pieces). Anyway this got me thinking about experimenting with trying to create a track which you can travel a cart along. Eventually I'm looking at making something similar to the mine cart levels from the classic Donkey Kong Country.

As I have only just started playing around with the editor, I was just wondering whether anyone had any idea as to how to go about defining the path that the cart needs to travel? Is there some way to get the cart to stick to the track? My current idea is to define points along the track and then use vectors between them to define the path. The only problem I have with this is when it comes to corners as I would need to generate some sort of equation to define the curve. The Math side is not a problem for me but surely there would be an easier way of doing it?

Also note that this is not a project, it's more of an experiment to get familiar with the editor

2. ### ClockworkNew Member

Ratings:
+1 / 0 / -0
Thats a pretty neat idea. I dont know if units are capable though of moving in an exact arc. I would imagine that in order to produce that effect you would need to issue move orders to small interval-ed points along the curve.

Thoughts that come to mind about doing this:
-Using an interval or increment system/function/loop to issue the move order once the beginning of the curve was reached.

-Using a circular region whose has a portion of its outer bounds which define the curve.

3. ### ClockworkNew Member

Ratings:
+1 / 0 / -0
I take that back. Interceptors seem to turn on arcs.

• Like x 1
4. ### Dave312Censored for your safe viewing

Ratings:
+269 / 0 / -0
Interesting. Thanks for the idea. Now the question is how do I implement that?

On a side note, it seems the Monorail Engine model has its facing direction 90 degrees out relative to its direction of travel. That means I try to make the unit move it looks really stupid as it travels sideways. My only solution that I can current find is to disable the units turnable property flag and set its direction manually via triggers.

Ratings:
+11 / 0 / -0
IIRC that Metalopolis map has a working monorail. Have you had a look at that?

6. ### Dave312Censored for your safe viewing

Ratings:
+269 / 0 / -0
Unless I'm thinking of a different map, that monorail appears stationary. Although that might have something to do with the fact that I am running the graphics at the low setting?

7. ### wingdnosringNew Member

Ratings:
+16 / 0 / -0
That would be very cool. Not just for experimentation, but I could see it as a travel method in RPGs.

I'm not familiar enough with the Data editor to help with this though . If you're willing to use the trigger editor, then I would recommend sliding the monorail a certain direction with direction + 90 facing. You could theoretically add regions just before and after the turns that rotate a unit 90 degrees around a point off the track (assuming your turns are perfect 90 degree angles?).

Just throwing out random ideas .

8. ### ClockworkNew Member

Ratings:
+1 / 0 / -0
I was working with interceptors last night and noticed something. In the unit, Stats - Flag there is a check for Turnable. That may be what you are looking for.

...it may also be a trap.

Ratings:
+11 / 0 / -0
Okay, this is really strange. It's stationary in the "test map" mode from the Editor, but I swear it went around a circuit when I played it under starcrack (don't judge me, it was invitational beta and I had no invite!). I can't get starcrack working now to verify, sadly. Anyone else able to testify on whether or not the monorail car in metalopolis moves in multiplayer/non-test games?

10. ### sqrageModeratorStaff Member

Ratings:
+508 / 0 / -0
That's not a monorail cart. It has fans on the front and back, it hovers.

Ratings:
+1 / 0 / -0
12. ### Dave312Censored for your safe viewing

Ratings:
+269 / 0 / -0
I'm currently working with that flag turned off. It allows me to ensure that the unit does not rotate while traveling in a particular direction. Sadly though, when I want the rail to travel around a bend, I have to manually set the direction it is facing.

wingdosring,sliding is probably the way to go. I was working on a system where the monorail would slide x distance toward the next point in the track. Once it reaches this point, a new vector is created and the monorail slides to this point. As for curves, I will use a comparision between points to determine if the monorail is travelling around a curve. And then I will somehow develop an equation to match the path of the track. I know in real life for roads and rail that they use an Euler Spiral Curve but somehow I doubt Blizzard would have used that too.

Ratings:
+11 / 0 / -0
So do MagLev trains but we still call them trains

14. ### sqrageModeratorStaff Member

Ratings:
+508 / 0 / -0
It doesn't have a rail...it hovers in air. Are helicopters monorails too?

Ratings:
+11 / 0 / -0
I guess helicopters that hover over monorail tracks exclusively could be labelled monorails.

16. ### WeepGodspeed to the sound of the pounding

Ratings:
+400 / 0 / -0
I wouldn't say so - for a maglev, the track is an integral part of the levitation mechanism. A helicopter, whether above a track or not, does not depend on the presence of the track for its ability to levitate and move.