<><><> <><><> <><><> More Stuff, no Copyrights (maybe a little credit if you edit stuff, but I don't mind otherwise) <><><> - There are loads of unused scripts and other mods within the UBER V7.0 FFA TDM.pk3 file, so feel free to use and modify whatever you find inside. Some mods from older versions of the UBER mod include: jetpacks, guided missiles, flyable planes, driveable cars, camo trigger, normal/midget/giant triggers, spy trigger (disguise yourself as an enemy team player), invisible/invulnerable triggers. Most information for executed mods are found as comments next to them in the maps' .scr files (describing their parameters), or within the mod's .scr file itself. Some examples are below. - track.scr: The most useful simple script for developers and modders. This script continuously iprints your coordinates and yaw-angle, or player.angles[1] (both only show integers, not decimals). This works for all players on the map. Instead of typing "coord" over and over again in the console while adding stuff to a map, now you can simply read off the numbers being iprinted to your screen (once per second). The player's iprinted yaw-angle does not show angles going up to 360 degrees; the script maintains the proper MOHAA format of 0 to 90 to 180/-180 to -90 to 0. Ideally, this script should be executed after "level waittill spawn". - Parameters: none - Example: exec global/track.scr - tele.scr: highly modified and versatile new teles, only need one exec line in a map's .scr file to spawn in either one tele or two teles (one normal, one return tele back to the normal one). Both teles only need two origins specified (the destination is the opposite tele's origin). If you just want regular red teles with default setsizes, then don't add anything to setsize 1, setsize 2, model, or scale. For the "teletype" parameter: 0 = one tele, 1 = two teles (1's destination = 2's origin, 2's destination = 1's origin), 2 = "fell under the map" tele (destination doesn't matter, player respawns). Scroll down in tele.scr to see available "spawnflags" numbers and info. - Parameters: origin, destination, teletype, setsize 1 [default: ( -10 -10 0 )], setsize 2 [default: ( 10 10 10 )], model (default = "fx/corona_red.tik"), scale (default = 1.5). - Example: exec map_triggers/tele.scr ( -6438 -35 -319 ) ( -6511 -35 -314 ) 1 - map_triggers/gen_switches/...switch.scr: alarm switch, cabinet open/close switch, detonator switch, electrical switch, enigma switch, lamp switch, light switch (multiple lights, one switch), train lever switch, valve switch (see the .scr files to see parameters). These scripts are very generic with animations and sounds, allowing any developer to easily spawn one in. Then, the developer can add functions for these switches such as blowing up stuff, moving objects around, virtually anything you want. - global/math.scr: This script holds the tried-and-tested sine and cosine math functions for spawning objects at any distance away from a desired object, for any desired yaw-angle ( pitch, yaw, roll ). For example, let's say you have a bangalore on a wall facing at a 55 degree yaw-angle. You want an explosion emitter about 100 units directly away from the bangalore, but you're not sure on the exact x and y coordinates to place this emitter since the bangalore is not facing 90, 180, 270, 360 degrees. Since 100 units is the hypotenuse distance away from the bangalore, plugging in the sine and cosine of the 55 degree angle multiplied by the 100 units distance gives the emitter-origin's x and y coordinates that must be added to the bangalore's origin. See the math.scr script file for more code examples and details. // local.bangalore.origin = ( 100 200 -50 ) // local.bangalore.angles = ( 0 55 0 ) // local.sin = (waitthread global/math.scr::sine 55) * 100 // y-axis // local.cos = (waitthread global/math.scr::cosine 55) * 100 // x-axis // local.explosion.origin = local.bangalore.origin + ( local.cos local.sin 0 ) - flickerrotate.scr: This script replaces most "Rotatex" threads found in various triggers' scripts. Instead of rotating the trigger model continuously in one direction and at a constant speed (for example: looping "self.angles = (self.angles + ( 05 -03 07 ))"), this script continuously randomizes different values for each axis of the model angles, making the model spin with more random motions. Any time the named trigger in this script is shot at, or if explosins occur near them (a second trigger with "spawnflags 128" is already spawned at $(name).origin), the trigger's light will briefly flash all-white for "waitframe" seconds before returning to its original color. When shot at, the trigger model's angles briefly rotate even faster for 0.4 seconds (randomization speeds up) before slowing back down to its original pace of randomization. If the trigger has two spinning models on it (example: Rocket Ammo or Grenade Ammo), then the identical thread "model2_shot" (parameters: name) runs at the same time, at the beginning of each "shot" setthread (the 2nd model's targetname must have a "_2" after the 1st model's targetname for this script to work). - The trigger's light colors can also be randomized with this script by specifying the current RGB light and how much RGB flickering occurs, since the light colors are randomizing at the same time as the trigger's angles. The trigger's three color-flicker parameters change how much rapid color-shifting occurs (flickers like a candle light). The recommended flicker amount for each R, G, B color is 10 to 25. Remember to keep RGB colors 0.8 or below if using a flicker amount of 20, since the maximum color value is 1. Flicker amounts are divided by 100 in the script, since "randomfloat" cannot randomize decimals; thus 20 is actually randomizing between 0.00 and 0.20 in RGB color values. For example, you want a blue light ( 0 0 1 ) only to flicker in brightness between +0.0 or +0.2, then lower the blue light by 0.2 units ( 0 0 0.8 ) and make only the parameter "blueflicker = 20". But if you want the blue light to flicker like a candle with a slight rainbow hue but only by 0.1 units, then also make the parameters "redflicker = 10" and "greenflicker = 10". Some triggers, such as Grenade Ammo and Rocket Ammo, have two rotating models instead of one. If the parameter "dontspawntrig = 1", then do not spawn the 2nd trigger with "spawnflags 128", since only one is needed for two models at the same origin. This script overall makes triggers more appealing aesthetically, while responding to being shot at by player weapons. - Parameters: trigger's name, RGB colors (each between 0 and 1), light radius, redflicker, greenflicker, blueflicker, dontspawntrig (NIL or 0 = yes, 1 = don't spawn 2nd trigger). - Example: exec global/flickerrotate.scr giantbomb_weapon ( 0 0 0.75 ) 125 10 10 25 - aliascache_triggersounds.scr: Instead of spawning in ScriptMasters every time a trigger is spawned in (for example, 3 Giant Bombs should not spawn three sets of identical ScriptMasters), all aliascache sounds for all triggers in UBER Mods V7.0 are located in this script (inside the "global" folder), about 105 ScriptMasters. This includes all aliascache sounds for playsounds and loopsounds throughout the mod scripts. - messagetrig_print.scr: This script was an attempt to recreate the white message text that appears in the center of a player's screen whenever they trigger a trigger (modified from the "global/message_print.scr" script). However, the only way to print the text is with "huddraw", which causes all players on the map to see the same text. A potential "ihuddraw" fix can make this script viable again. For a while, I couldn't figure out why some triggers' messages were not appearing so I made this script to fix the issue. Turns out, "waitframe" was needed after a player triggers a trigger (displaying the center-screen message) and before the trigger was removed from the ground. This script also allows for specifying the time duration that the text appears on the screen. Text can flash briefly on the screen, or stay there for several seconds. Always use "local.player" or "self" and use "thread" to load in the messagetrig_print.scr::message thread. - Parameters: message in quotations, display time. - Example: local.player thread global/messagetrig_print.scr::message "*** Avoid spotlight beams on the ground! ***" 0.8 - test_randomizer/health_test.scr & others: These scripts are for testing purposes only. They serve to show all 10 randomized origins for one of the following triggers: Giant Bomb, Light Bomb, Grenade Ammo, Rocket Ammo, Toxic Snowball Ammo, +200 Health Trigger. Copy the 10 origins given to a trigger and paste them in the respective test_randomizer parameters to spawn an illuminated static object at all 10 locations, helping a developer to spread out all randomized origins evenly across the map. Avoid using all 6 test_randomizers at the same time, since too many illuminated objects on the map causes all objects to lose their lights (unless a player looks at an angle that avoids rendering some other objects). - unusedtriggers/spy.scr & others: Not my original script, but modified to spawn in two spy triggers (ideally for TDM or OBJ gametypes, not FFA). The Axis-side spy uniform allows only Axis players to USE the trigger, changing their player skin model to a random Allies skin model. The uniformed Axis spy will also have an Allies avatar icon above their head, completing their disguise. The Allies-side spy uniform allows only Allies to USE the trigger, changing their player skin model to a random Axis skin model. The uniformed Allies spy will also have an Axis avatar icon above their head. - Parameters: Axis-side spy trigger origin, Allies-side spy trigger origin. - Example: exec .../spy.scr ( 1023 -292 102 ) ( -538 852 202 ) - jetpack/trigger.scr: Revamped Elgan's jetpack mod, and isolated all its scripts into one "trigger.scr" file. This script, when triggered, attaches a jetpack to a player's back. When the player jumps and holds USE while in midair, they will gain speed rapidly and move diagonally upwards (losing fuel 10x per second), while the pipe steam emitters become larger in scale. Letting go of USE can make the player glide downwards slowly (losing fuel 2x per second). Once back on the ground, the steam emitters and steam sounds turn off (gaining fuel 1x per 2 seconds). Running into a jetpack trigger fully replenishes the player's fuel. When the jetpack runs out of fuel, the player cannot fly anymore. They will also fall out of the sky with full gravity if they ran out of fuel in midair. Player movements while jetpack-thrusting were simplified, so players can only thrust in the direction they're facing (should be easier to fly). There are no parameters besides origin, since all the fuel incrementing/decrementing times (while thrusting, floating, or on the ground) and max fuel are specified as "level" variables at the top of this script. - Parameters: origin. - Example: exec global/jetpack.scr ( 340 128 -100 ) - GuidedMissile/SpawnTrigger.scr: Remains unchanged since UBER BASEBUILDER V6.0 (Version 6 of this mod). This script, when triggered, turns a player into a flying V2 rocket missile (tele'd a few 100 units up to avoid immediately crashing). The player can control the missile's movements by looking around, but the speed remains constant. If the missile collides into another player, that player gets blown up. The guided missile player can also press Left/Right-click to fire the missile at much faster speed, but only at the current direction as the player's angles before firing. Once fired, the player does not follow the faster-moving missile. After the missile explodes, the player respawns. - Parameters: origin. - Example: exec GuidedMissile/SpawnTrigger.scr ( -538 -223 472 ) - server_planes/trigger.scr: Elgan's flyable planes script, with an added parameter for stuka_fly & stuka_dsrt_fly, and c47fly planes. This script, when triggered, turns a player into a flying airplane (tele'd a few 100 units up to avoid immediately crashing). The player can control the plane's movements by looking around, and the speed can be increased by holding W (move forward key), or decreased by holding S (move back key). Each flyable plane has missiles, 30 Cal machine gun, and mg42 machine gun (rotate between them with USE key), along with droppable bombs that can be used at any time (Right-click/secondary fire). The missiles are fired from different points on the plane's wings, depending on which "modelpair" of planes is used, calculated by "global/math.scr". The player can control how close/far away their camera is from the back of the plane by holding the Run/Walk button (not the toggle button; could be SHIFT key) and holding W or S (move camera closer, further away) at the same time. If the player jumps with SPACEBAR key at any time while flying, the player ejects from the plane. The plane flies in a downward trajectory (velocity and angles are applied) while smoking and on fire, and explodes upon impacting the ground or a wall. - Parameters: origin, plane model team ("axis" or "allies"; default is allies), trigger model's scale, modelpair (for allies & axis: 0 = p47 & fockwulf, 1 = stuka_dsrt and stuka, 2 = c47 for both teams), start_pos origin (keep NIL for default: starting 500 z-units above trigger model's origin). - Example: exec server_planes/trigger.scr ( -2940 -2787 123 ) "allies" .2 0 - truckstuff_trig.scr: This script was made for easily modifying any opeltrucks laying around in singleplayer maps (also includes others like gmctrucks, but only opeltrucks have animations and "destroyed" models). A trigger_use is spawned ideally near the driver-side door (with the trigger origin parameter), and a hidden script_model is automatically added inside the truck's engine for playsounds and loopsounds (about 130 units forward from the truck's angle, calculated with "global/math.scr"). For the trigger origin, simply stand on the ground next to the driver-side door and find coords; the script will add 80 z-axis units so the trigger is centered on the door. Depending on "horn" and "headlights" parameters, the opeltruck may need to be turned on first by holding USE at the trigger for 3 seconds. Once turned on and idling, holding USE again for less than 1 second honks the truck horn. Holding USE for 1 to 3 seconds turns on/off the truck's headlights. Holding USE for 3 seconds will turn the truck back off. The script also spawns in 3 mini invisible kingtanks for sensing only rocket explosions and radiusdamage explosions, similar to the kingtanks in the OBJ maps for blowing up objectives with radiobomb-walkies and giant bombs. The tanks are on all three sides around the opeltruck's engine. Once a tank is destroyed, the opeltruck explodes and becomes an opeltruck_d destroyed model. If a giant bomb touches the truck at any point in time (or optionally touches a 2nd targetname, such as a truck's playerclip added for jumping into the back of the truck), the truck also blows up. - Parameters: trig origin, truck's targetname, horn (0 = no horn, 1 = honk while vehicle is on only, 2 = honk while on or off), headlights (0 = none, 1 = turn on/off while vehicle is on only, 2 = turn on/off anytime), health (if > 0, then 3 tank sensors are spawned in), explosion damage, explosion radius. - Example: exec maps/gen_mapscripts/truckstuff_trig.scr ( -3545 -1069 396 ) $temptruck2 1 1 100 500 600 $2ndtruckclip - doorsgates.scr: This script was made to allow various wood/metal doors and gates, and shutters to open/close, particularly found within singleplayer maps. A trigger_use must be spawned in the map's script before the trigger can be loaded as "self" into the doorsgates.scr script (many doors require customized setsizes, so no triggers are spawned within this script). A thread is chosen for the type of doors to be openable, each containing respective playsounds. If there's only one door, then the 2nd door parameter must be set as "NIL" for the script to work properly. The opening/closing times were carefully chosen to match the length of the wood/metal playsounds, so those times are not added as parameters. The rotate amount can be positive or negative, in case the doors or shutters are rotating the wrong way. Since shutters are always in pairs, the "shutters" thread does not have a "NIL" option for only opening one shutter. - Parameters (a): door 1's targetname, door 2's targetname, rotate amount. - Example (a): local.doorA thread maps/gen_mapscripts/doorsgates.scr::wood_doors $doorA NIL 85 - Example (b): local.woodgates thread maps/gen_mapscripts/doorsgates.scr::wood_gates $introdoorL $introdoorR -85 - Example (c): local.lockgates thread maps/gen_mapscripts/doorsgates.scr::metal_gates $left_gate $right_gate -85 - Example (d): local.singlegate2 thread maps/gen_mapscripts/doorsgates.scr::metal_doors $door_early2 NIL 85 - Example (e): local.shutter1 thread maps/gen_mapscripts/doorsgates.scr::shutters $endshutterL $endshutterR 85 - bonfire.scr: This generic script spawns in any desired fire emitter (or any other model) for damaging players over time that get too close to the emitter. Once a player gets within "burn distance" units from the emitter, an identical emitter is attached to the player that is taking burn damage, for "burn time" seconds. By default, each damage increment deals 1 damage. Optionally, the scale of the attached fire emitter can also be specified. - Parameters: origin, model, fire scale, burn time, burn distance, damage per increment (default = 1), burning model's scale (default = 1). - Example: exec maps/gen_mapscripts/bonfire.scr ( -2578 -2276 320 ) "emitters/fire.tik" 1 4.0 100 1 0.8 - ubersound.scr & uberdialog.scr: Both scripts have fixed the issues where some sounds are not playing in custom maps or some singleplayer maps, by adding all possible map-name characters in the soundparms' maps parameter ("0 1 2 3 4 5 6 7 8 9 a b c d e f g h i j k l m n o p q r s t u v w x y z " instead of "m dm moh obj train "). Ideally, these scripts should be saved for keeping all the game's sounds for all maps. The uberdialog.scr script provides almost 100 custom multiplayer pain/death sounds (sounds come from various dialog across MOHAA campaign): 26 custom pain sounds and 65 custom death sounds, all found by searching "searingwolfe" in the .scr file. <><><> <><><>