User Tools

Site Tools


tnhscript:elevatorcar

ElevatorCar

When the lift is about to move, activate the joint tweq in reverse and wait for it to complete. On TweqComplete, activate the lift. On WaypointReached, stop the car and activate the joint tweq forward. Sends TurnOff to links from the waypoint it’s leaving and TurnOn to links from the waypoint it arrives at. On TurnOn, moves to the next waypoint. TurnOff moves to the previous waypoint.

Moving terrain uses just the forward TPath link to determine the speed when moving to a waypoint. If there is no link to an object, it uses the default speed of 0.0. Not good. StdElevator expects the waypoints to be linked in a loop. But this script wants to know where the start and end waypoints are. So for the first waypoint, which normally wouldn’t have a TPath link to it, a dummy marker has to be created and linked to the real first point.

Messages TurnOn, TurnOff, TweqComplete, MovingTerrainWaypoint, Call, Starting, Stopping
Links TPath, TPathNext, ControlDevice, ScriptParams
Properties Misc\MovingTerrain, Tweq\Joints, Tweq\JointsState
tnhscript/elevatorcar.txt · Last modified: 2010/11/22 19:11 (external edit)