path_rotate is a marker entity which works like path_corner to define a route for a func_rotate_train. Because the func_rotate_train can rotate as well as slide, the path_rotate has to specify a greater amount of information about each section of the motion.

The basic setup for a chain of path_rotate entities is the same as for path_corner. Give each path_rotate a unique targetname, then make each one target the next path_rotate in the chain.

speed sets how fast the train should move when leaving this path_rotate (but also see the MOVETIME spawnflag). If this is set to -1 then the motion is instantaneous.

The most important part of setting up a path_rotate is setting the spawnflags for the behaviour you want.

spawnflag 1 = bit#1 is ROTATION, which tells the train to rotate at the rate specified by the corner’s rotate key when leaving this path_rotate. Use ‘0 0 0’ to stop rotation. This rotation persists through other path_rotate corners until overridden.

spawnflag 2 = bit#2 is ANGLES. This tells the train to rotate to the angles specified by angles while travelling towards this path_rotate. You may need to use values < 0 or > 360 to guarantee that it turns in a certain direction. Upon reaching this destination the train’s angles will be reset within the range [0, 360). Having this flag set overrides rotation set by a previous path_rotate.

spawnflag 3 = bit#4 is STOP. This tells the train to stop and wait to be re-triggered upon reaching this corner

spawnflag 4 = bit#8 is NO_ROTATE. This works in conjunction with the STOP spawnflag above, and makes sure the train will stop rotating while it waits to be re-triggered.

spawnflag 5 = bit#16 is DAMAGE. On arrival at this path_rotate, the train will change its dmg field to match the dmg field of the path_rotate. This can be used to enable or disable damage done.

spawnflag 6 = bit#32 is MOVETIME. This tells the train to interpret speed as the length of time to take moving from this corner to the next.

spawnflag 7 = bit#64 is SET_DAMAGE. This finds all trigger_hurt and func_movewall entities whose targetname matches the train’s target, and updates the damage they inflict to the dmg value of this path_rotate

wait sets the amount of time that the train will stop at this path_rotate before moving again towards the next one. If this path_rotate has either the ANGLES or NO_ROTATE spawnflag, it will stop rotating while waiting. Otherwise it will continue to rotate at the speed it came in with.

noise contains the name of the sound to play when the train stops at this corner.

noise1 contains the name of the sound to play when train moves from this corner.

event is a target to trigger when the train arrives at this path_rotate.

<-Back to the tutorial

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s