Monorail Pathing

Dave312

Censored for your safe viewing
Reaction score
269
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 :D
 

Clockwork

New Member
Reaction score
1
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.
 

Dave312

Censored for your safe viewing
Reaction score
269
I take that back. Interceptors seem to turn on arcs.

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.
 

Dave312

Censored for your safe viewing
Reaction score
269
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?
 

wingdnosring

New Member
Reaction score
16
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 :).
 

Clockwork

New Member
Reaction score
1
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.
 

Advice D.

New Member
Reaction score
11
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?
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?
 

sqrage

Mega Super Ultra Cool Member
Reaction score
515
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?

That's not a monorail cart. It has fans on the front and back, it hovers.
 

Dave312

Censored for your safe viewing
Reaction score
269
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.

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.
 

sqrage

Mega Super Ultra Cool Member
Reaction score
515
It doesn't have a rail...it hovers in air. Are helicopters monorails too?
 

Weep

Godspeed to the sound of the pounding
Reaction score
401
I guess helicopters that hover over monorail tracks exclusively could be labelled monorails.

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.

Lol, this thread. :p
 

Dave312

Censored for your safe viewing
Reaction score
269
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.

Lol, this thread. :p

Agreed. For the system to be classified as rail, the track has to play some functional purpose, not just define the path that should be taken.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top