Distance

Distance

Not enough ratings
Editor tricks: sticky rails
By Sperzieb00n
how to create sticky grindable rails
   
Award
Favorite
Favorited
Unfavorite
Introduction
Grinds... we've all done them... mostly by accident, so now it is time to do them on purpose!



This guide will explain 2 methods of turning a smooth spline simple into a rail capable of pulling players along its path while they slide on top.

1. Preparing one segment

First we need a piece of rail with flat sides, a very long SplineQuad is perfect, i've set the scale of its track nodes to 0.427 so the rail easily fits between the refractor wheels, i also prefer to add a bright line across the middle.

Select one of the track nodes, snap cursor to selected group, and make a ForceZoneBox on this position. Scale it to 1,1,1 global, 1,3,1 local, then set the wind speed to 12 and the drag to 1,5.

Copy & paste the ForceZoneBox on its current position, move both the copy and original 0.75 units in different directions left and right from the node, rotate both 45 degrees towards the rail.

Shift one of the boxes 0.75 units along the rail direction, re-name one "BoxL" and the other "BoxR".

select all boxes and paste them along the rail direction at 1.25 units intervals, you should end up with something like this when you reach 128 boxes.


Change the second direction vector of ALL boxes to -0.015 to add some downforce to grinds, tidy up the remaining part of spline by shortening it down to the edge of the last box, attach all the boxes to the spline.

Give the rail a light curve by moving one of the nodes, and check if it works.

Rectangular boxes tend to yield better results in corners.

Undo back to the point where the rail is straight and group the rail with its forces as "OriginalSegment"....Congratulations, you've created a single segment of grindable rail!
2. one-way rail
This rail pulls players along its path in one direction, similar rail can be found in "On rails"


Make copies of "OriginalSegment", link the nodes of those copies together.

Ungroup each segment, and use the nodes to shape the rail, Don't forget wich side is up as a tiny portion of the rail force needs to point downwards so the player sits tight on the rail.
3. Two-way rail: directional logic
This rail pulls players along its path in both directions, similar rail can be found in "On rails: Arena".

Two-way grinding requires double the forcezoneboxes and some additional tracking logic to tell rails in wich direction to pull.

constructing the tracking
Select the refractor on the map, snap cursor to selected group, and enclose the refractor in between 4 giant triggers with a global scaling of 1,1,1 and a local scaling of 1000,500,1000, and center offsets for each box of 504 in X+- and Z+-, so trigger origin has the same position as the refractor.

The offset being slightly more than half is important, this creates a deadzone of 8x8 units in between the triggers, so the player can't hit 2 opossing triggers at the same time.

Name each trigger and its event to something useful, these triggers will output the direction of travel so name them AND their events L,R,FWD,BWD.

Group all triggers, give the group a useful name.

group the group with it self 4 times, every self-group must contain an extending slide animation that plays when the trigger along the direction of animation is active, name every self group like the corresponding trigger and take over parameters from the screenshots.

The result of the animations should be that the box of triggers gets tracking behaviour, and starts to output player XZ direction in pulses, as it actively works to trap the player within the deadzone.

You don't have to self-group a 5th time, but still it is handy so the group of triggers doesn't show up as the name of the last self-group.

  • tweak translation vector of directional triggers to reduce/increase tracking speed
  • tweak size of the directional triggers to decrease/increase catch-sensitivity of rails
4. Two-way rail: ForceZoneBox logic
Copy "Originalsegment", and isolate the SplineQuad from it by ungrouping and deleting its forcezoneboxes, copy this splinequad a few times.

Connect the splinequads and bend them in the final desired rail shape by moving some nodes, make the bends as smooth as possible, especially vertical bending must be kept to a minimum as sudden vertical changes tend to throw you off the rail.

sliding forceboxes in place
Extend one of the outer nodes with copies of "OriginalSegment", ungroup the segments, select and move all ForceZoneBoxes along the track until they are all on the shaped piece of rail.

Delete the now "empty" pieces of SplineQuad, select all ForceZoneBoxes and detach them from the rail, then group them under a name that indictes grind direction.

Add a vertical sliding animation to the group, trigger the animation to move the forcebox group in place when its directional event happens, and into the ground when it stops, use screenshot parameters.

As stated in a previous chapter, directional events output in a pulse format, pong delay is used to bridge the gap between pulses at low tracking speed.

repeat the "sliding forceboxes in place" steps with pieces of reversed "OriginalSegment" to get the forces in place for sliding in the other direction, make sure every group of forceboxes responds to a different output from the directional triggers.

Congratulations, your rail should now be grindable from both directions,
  • tweak forcezoneboxes to change the grinding speed and stability
  • tweak pingpong delay to change direction hold time/sensitivity
5. Extra
  • Always animate should be ticked on every animation in the two-way rail system.

  • I deliberately explained directional logic for X and Z; rotate a rail 60-90 degrees the other way and you can simply use events from the other axis to hook up grind direction.

  • Two-way rail is heavy on animations, and maps with a lot of it can induce freezes into the game if a player changes direction a lot.

  • Test your forcezoneboxes on a single curved segment before you add them on a larger scale, this will especially pay off when you're creating two-way rails.

  • Be careful with wind force above above 20 and drag above 2.

  • Just copy some rail from "On Rails" if you're having trouble setting up a stable but speedy grind.