Call of Duty 5: Elevator Brushes

From COD Modding & Mapping Wiki
Jump to navigation Jump to search

Implementation

First place a script_model or create a script_brushmodel to be used for the elevator platform.

Make a trigger_use if you want a switch operated elevator. Make a trigger_multiple if you want a Quake style elevator.

Give this trigger a targetname of elevator_trigger.

If making a switch operated elevator, place a script_model or script_brushmodel in the map where you want the switch. Make the trigger target the newly created switch entity.

If making a Quake style elevator, make the trigger target the elevator platform entity.

Place a script_struct dead center of the platform entity at the bottom point in the platform's route. Place a script_struct dead center of the platform entity at the next point in the platform's route. Continue placing script_structs dead center of the platform entity at the next point in the platform's route.

Give the bottom script_struct a script_noteworthy of platform_start. Make the platform entity target this script_struct. Make this script_struct target the next script_struct in the elevator's path. Continue making the elevator's path by targeting the path script_structs to each other. These can be placed in any direction, not just straight up and down. Just ensure the platform will center on them.


Hydraulic Sounds (Optional)

If you want to play hydraulic or machinery sounds for the elevator, place a script_struct where you want the sound to play. Make the platform target this script_struct. Give this script_struct a script_noteworthy of audio_point. Define a variable in your level script of level.scr_sound["description"] = "actual_sound_alias". The "description" can be any description you want to use, such as "hydraulics". the "actual_sound_alias" must be an actual sound alias defined in your level's csv or a common csv. Give this script_struct a script_sound of whatever you defined as "description". You can place as many script_structs this way as you want.


Alarm Sound (Optional)

If you want an alarm sound to play when the elevator is activated, place a script_model or script_brushmodel where you want the sound to play. Make the platform target this entity. Give this entity a script_noteworthy of elevator_klaxon_speaker. Define a variable in your level script of level.scr_sound["description"] = "actual_sound_alias". The "description" can be any description you want to use, such as "alarm_sound". the "actual_sound_alias" must be an actual sound alias defined in your level's csv or a common csv. Give this entity a script_sound of whatever you defined as "description". You can place as many entities this way as you want.


Gates (Optional)

If you want a gate or gates to animate when the elevator is activated, place a script_model or script_brushmodel to use as the gate. Do NOT rotate the gate or place it where you want the gate to be. This will be handled by the _elevator.gsc utility script. Make the platform target this gate. Give this gate a script_noteworthy of elevator_gate. Give this gate a script_int equal to the amount of degrees you want it to rotate, ie: 90 Place a script_struct where you want the gate to be centered and have the gate target this script_struct. Rotate this script_struct in the direction you want the gate to move. You can place as many gates per elevator this way as you want.

Define a variable in your level script of level.scr_sound["description"] = "actual_sound_alias". The "description" can be any description you want to use, such as "gate_rotate". the "actual_sound_alias" must be an actual sound alias defined in your level's csv or a common csv. Give this gate a script_sound of whatever you defined as "description".


Speed Point-To-Point (Optional)

If you dont specify a value for level.elevator_speed in your level script, it will default to 5. This is how many seconds the platform will take to move from point to point along its path.

If you dont specify a value for level.elevator_gate_speed in your level script, it will default to 1. This is how many seconds the platform gates, if you included any in your level, will take to rotate when they are raised or lowered.


Speed Movement (Optional)

If you don’t specify a speed for your elevator platform in Radiant, it will default to 100. To set the speed, make a K/V pair of speed / 100 (or whatever speed you want). Each individual platform can have a different speed set to it if you want. This is the speed of the platform in MPH. Do NOT set a speed K/V pair only on the script_struct that the platform targets; set it on THAT script_struct's target as well; it MUST be set on at least this script_struct. You can then set any positive whole number value for speed on the rest of the script_structs that make up the elevator's path if you want to.


If you don’t specify an amount of degrees for your elevator platform gates to rotate in Radiant, it will default to 90. To set the desired amount of angles, make a K/V pair of script_int / 90 (or whatever angle you want). Each individual platform can have a different angle set to it if you want.


If you don’t specify a speed for your elevator platform gates in Radiant, it will default to 1. This is how many seconds the platform gates, if you included any in your level, will take to rotate when they are raised or lowered. To set the speed, make a K/V pair of script_delay / 1 (or whatever speed you want). This speed should be defined in seconds, not actual speed in MPH like the platforms.


Notes of Interest

Platforms and platform switches must be either a script_model or a script_brushmodel. You can use a prefab for the platform that actually moves, but you must stamp it into your level. You cannot have a trigger or switch target a prefab.

You can setup the elevator and all its parts, then save this as a prefab, and copy and paste this prefab into the level where ever you want to. Be certain that your platform triggers inside the prefab retain their targetname of elevator_trigger though, as it may change when you make the prefab and paste it around the level.


Souce: Treyarch's Wiki