RTCW's DeGeneration - Scripts
===================================
Version: 0.981
Date:    7/24/2004
Site:    http://www.tramdesign.net

Contents: This document gives example scripts that can be used with DeGeneration.




scripts
=======

* Setting spawn points
----------------------
The script below will toggle between the spawns only in DeGeneration maps. The setspawnpt command was augmented to allow for mappers to set targetnames so instead of the old way of doing setspawnpt 1 to spawn yourself nearest allies you can now be much more direct. However this could get confusing if mappers deviate from the standards that we've set.

Possible selections:
spawn_allies_generator - spawns nearest allies generator
spawn_allies_checkpoint - spawns nearest allies checkpoint
spawn_drop_zone - spawns nearest drop zone
spawn_axis_checkpoint - spawns nearest axis checkpoint
spawn_axis_generator - spawns neaest axis generator

Script example:
In the script below hitting F6 will toggle between all 5 possible spawn areas. Depending on the map configuration if an allies player selects to spawn at either the axis generator or axis checkpoint where they spawn might not be predictable. They will spawn as close to their selection as possible. For example in Warehouse if an allies player selects axis generator they may spawn at the allies checkpoint. If they choose axis checkpoint they may spawn at the drop zone.


code:
--------------------------------------------------------------------------------

//toggles spawn default
set spawn_alliesg "setspawnpt spawn_allies_generator; echo ^2Spawning: Allies Generator; set spawnpoint vstr spawn_alliesc;"
set spawn_alliesc "setspawnpt spawn_allies_checkpoint; echo ^2Spawning: Allies Checkpoint; set spawnpoint vstr spawn_dropzone;"
set spawn_dropzone "setspawnpt spawn_drop_zone; echo ^2Spawning: Dropzone; set spawnpoint vstr spawn_axisc;"
set spawn_axisc "setspawnpt spawn_axis_checkpoint; echo ^2Spawning: Axis Checkpoint; set spawnpoint vstr spawn_axisg;"
set spawn_axisg "setspawnpt spawn_axis_generator; echo ^2Spawning: Axis Generator; set spawnpoint vstr spawn_alliesg;"
set spawnpoint "vstr spawn_dropzone"
bind f6 "vstr spawnpoint"

--------------------------------------------------------------------------------

*Building the generator
-----------------------
The commands BuildableDebugInc, BuildableDebugTarget, BuildableDebug & BuildableDebugHealth were created to make testing the buildable entity much easier and faster and are only available in developer mode. Keep in mind that this doesn't only pertain to the generator since you can make anything buildable with tons of options.

Script example:
The four scripts below will allow you to build the generator effortlessly without having to get parts. If you add these to your config this is what they'll do:

*F1 - toggles between the buildable going up in 100 health increments (best we've found when dealing with generator, any higher builds too fast) or down in 100 health increments.
*F2 - toggles between the axis generator and the allies generator. For buildable entities other than generators simply replace targetname.
*F3/F4 - changes generator health value to something specific ranging from 0-10000. F4 changes health upwards and F3 downwards.
*F5 - starts the debugging of the buildable.


code:
--------------------------------------------------------------------------------

//changes from +100/-100 increments
set gdbug+ "BuildableDebugInc 100; echo ^2+100 enabled; set gdbug vstr gdbug-"
set gdbug- "BuildableDebugInc -100; echo ^2-100 enabled; set gdbug vstr gdbug+"
set gdbug "vstr gdbug+"
bind F7 "vstr gdbug"

//toggles axis-allies buildable
set gdbug_axis "BuildableDebugTarget generator_axis; echo ^2Axis generator selected; set gdbug_team vstr gdbug_allies;"
set gdbug_allies "BuildableDebugTarget generator_allies; echo ^2Allies generator selected; set gdbug_team vstr gdbug_axis;"
set gdbug_team "vstr gdbug_axis"
bind F8 "vstr gdbug_team"

//start-stop debugging
set gd_start "BuildableDebug; set gd_state vstr gd_stop"
set gd_stop "BuildableDebug; set gd_state vstr gd_start"
set gd_state "vstr gd_start"
bind F9 "vstr gd_state"

//raise-lower generator health
//bind f3 "vstr health30"
//bind f4 "vstr health70"
set health00 "BuildableDebugHealth 0;echo ^2Gen @ 0%;bind f4 vstr health10"
set health10 "BuildableDebugHealth 1000;echo ^2Gen @ 10%;bind f3 vstr health00;bind f4 vstr health20"
set health20 "BuildableDebugHealth 2000;echo ^2Gen @ 20%;bind f3 vstr health10;bind f4 vstr health30"
set health30 "BuildableDebugHealth 3000;echo ^2Gen @ 30%;bind f3 vstr health20;bind f4 vstr health40"
set health40 "BuildableDebugHealth 4000;echo ^2Gen @ 40%;bind f3 vstr health30;bind f4 vstr health50"
set health50 "BuildableDebugHealth 5000;echo ^2Gen @ 50%;bind f3 vstr health40;bind f4 vstr health60"
set health60 "BuildableDebugHealth 6000;echo ^2Gen @ 60%;bind f3 vstr health50;bind f4 vstr health70"
set health70 "BuildableDebugHealth 7000;echo ^2Gen @ 70%;bind f3 vstr health60;bind f4 vstr health80"
set health80 "BuildableDebugHealth 8000;echo ^2Gen @ 80%;bind f3 vstr health70;bind f4 vstr health90"
set health90 "BuildableDebugHealth 9000;echo ^2Gen @ 90%;bind f3 vstr health80;bind f4 vstr health100"
set health100 "BuildableDebugHealth 10000;echo ^2Gen @ 100%;bind f3 vstr health90"

--------------------------------------------------------------------------------