Mutator, by Cranky,
requires
The Secret Files, with JJ2+
Elevator Script / Elevator Editor
This script adds moving elevators to Jazz Jackrabbit 2 levels. Elevators can be built from ordinary level tiles, allowing a platform, wall, floor or even an entire elevator room to move together as one unit.
Elevators may either be controlled by a player or move automatically when a player steps onto them. Several pieces can share the same elevator ID, so decorative walls, ceilings and background parts can move together with the main platform.
The package also includes an in-game Elevator Editor and a separate tutorial. The Editor contains its own Help page, so many of the controls and block types can also be reviewed directly inside JJ2.
Using the Elevator script
The code is split into:
- Elevator.asc – contains the elevator behavior and synchronization.
- Elevator.mut – loads the elevator behavior together with the Elevator Editor, help menu and administrator commands.
For the easiest setup, the mutator can simply be loaded while creating or testing a level. Level authors who want to integrate the elevator behavior directly into a level script can use Elevator.asc; the included ElevatorTutorial.txt explains the system and event setup in considerably more detail.
Elevator Editor
The editor can be opened by an administrator with:
!elevatorEdit
!elevatorEditor
The Editor can be controlled with the mouse or keyboard. Elevator IDs are shown directly on the edited blocks while the Editor is open, making it easier to see which pieces belong together.
The main controls appear in the following order:
- < Elevator ID > – Selects which elevator is being edited. Valid elevator IDs are 1-15.
- Add – Selects the next available elevator ID.
- Delete – Deletes the entire selected elevator.
- Help – Opens the in-game instructions.
Elevator tools
- Controllable elevator – Creates the main platform of an elevator that can be controlled by a player standing on it.
Its control mode can be changed between:
- Up/Down – vertical movement only.
- Left/Right – horizontal movement only.
- All – allows movement in all four directions.
For a controllable elevator, the player uses the permitted direction keys to move it. Fire locks or unlocks the elevator, while Jump releases control.
- Autonomous elevator – Creates an elevator that moves automatically when a player steps onto it.
- Elevator component – Adds a solid tile that moves together with the selected elevator but does not itself trigger autonomous movement. This can be used for walls, ceilings, floors or other parts of an elevator room.
- Background component – Moves together with the elevator without acting as a solid platform.
- Boll Platform elevator piece – Adds a Boll Platform that belongs to the elevator. Boll Platforms can move with an elevator but are not intended to act as the normal autonomous trigger.
- Elevator limit – Places the travel limit used by the selected elevator.
- Delete tile – Removes one elevator tile or limit tile without deleting the whole elevator.
Elevator settings
- Speed: < 1.00 > – Changes the speed of the selected elevator in increments of 0.25, from 0.25 up to 5.00.
- Elevator Type: Upward / Downward – Determines the normal travel direction and limit behavior of the selected elevator.
- Save – Saves the edited elevator layout. An asterisk appears beside Save when there are unsaved changes.
Closing the Editor also saves outstanding changes automatically, but the level must be restarted before the newly saved elevator layout is applied.
How elevator pieces work
Every elevator uses an ID. All pieces with the same ID belong to the same moving structure.
For example, Elevator 1 may consist of one controllable platform, several solid wall and ceiling components, some background decoration and one limit. When the main elevator moves, the other pieces assigned to Elevator 1 move with it.
The Editor uses JJ2's Pink Platform, Boll Platform and Thing events internally to store the necessary elevator information. Level authors who prefer to configure the events manually can find the exact event parameters and examples in ElevatorTutorial.txt.
Saving elevator layouts
The Editor stores the layout in a level-specific file:
<levelName>_Elevator.asdat
For example:
ultra hotel 3_Elevator.asdat
When the level is loaded again, the script reads this file and rebuilds the saved elevator event layout.
This means the Editor can be used to create, modify and delete elevator pieces without permanently editing the level file itself. Changes are applied after the level restarts.
Administrator commands
The following commands can control existing elevators directly:
- !elevator up <id> / !elevator climb <id> – Moves the elevator upward.
- !elevator down <id> / !elevator descend <id> – Moves the elevator downward.
- !elevator lock <id> / !elevator stop <id> – Toggles the elevator's locked state.
- !elevator fup <id> – Unlocks the elevator and forces it upward.
- !elevator fdown <id> – Unlocks the elevator and forces it downward.
- !elevator location <id> – Displays the tile location of the elevator's bottom piece.
Multiplayer synchronization
Elevator movement and control state are synchronized in multiplayer. The script sends elevator position, movement, lock state and player-control information so that clients can see the same moving elevator rather than independently simulating unrelated positions.
A joining client can also request the current elevator state from the server so that already-moving or locked elevators are synchronized after joining.
Common setup notes
- Use elevator IDs from 1 to 15. ID 0 is not an elevator.
- All pieces belonging to the same elevator must use the same ID.
- Use at least one controllable or autonomous main platform rather than building an elevator entirely from component tiles.
- For normal autonomous elevators, use a Pink Platform as the main elevator tile. Boll Platform pieces are intended as additional elevator pieces rather than the ordinary autonomous trigger.
- Remember to place the appropriate elevator limit.
- Restart the level after saving Editor changes.
For more detailed examples, manual event parameters and step-by-step elevator construction, see the included ElevatorTutorial.txt and the Editor's in-game Help page.
Sample level
The same sample level that the npcBunnies script uses is included here: ultra hotel 3.j2l, with its ultra hotel 3_Elevator.asdat file, so you can see how elevators work.
Special Thanks
Special thanks to Fabian[NC] for inspiring this script.
| 10.91 kB | ||
| 6.11 kB | ||
| 0 ultra hotel | 248.28 kB | |
| 0.85 kB | ||
| 0.22 kB | ||
| 19.30 kB | ||
| 59.69 kB | ||
| 21.02 kB | ||
| 1.95 kB | ||
| 1.67 kB | ||
| 35.31 kB |
You must log in to write a comment or review.
Jazz2Online © 1999-INFINITY (Site Credits). We have a Privacy Policy. Jazz Jackrabbit, Jazz Jackrabbit 2, Jazz Jackrabbit Advance and all related trademarks and media are ™ and © Epic Games. Lori Jackrabbit is © Dean Dodrill. J2O development powered by Loops of Fury and Chemical Beats.
Eat your lima beans, Johnny.