- I made sure my file(s) follow the Submissions Guidelines
- Yes
Paragliders!
Paragliders are a whole new mechanic, tightly integrated into Kart's mechanics, that allows players to use paragliders to reach new heights and verticality never seen before in Kart! However, instead of being a balance addendum to the base game, they are instead added by mappers themselves, acting as a possible gimmick or even simply as a cool set-piece.Gameplay features
- Paragliding players behave as if they were grounded while floating, meaning that they accelerate, and they can use Sneakers and Rocket Sneakers unlike before too, to allow for even more interesting paths and shortcuts.
- Players are given a turn-rate while paragliding, dictated by their handling - the more handling, the better!
- It's possible to hold up or down (Aim Forward and Backward respectively) to either get to the ground as soon as possible, or to flutter upwards, gaining an extra pinch of height!
- And if all fails, hold BRAKE to let go to the paraglider, dropping you to the ground!
- It's possible to invert your controls using
paraglider_invert off/on
, inluafiles/paraglider.cfg
. If the file doesn't exist, it will be created for you. - Wanna use Paragliders anywhere? Toggle
paraglider_debug_deployanywhere
on, and bind CUSTOM3 to a button - it will allow you to deploy a paraglider anywhere, which is helpful for testing and for fun!
Mapper features
- The script, visuals and sounds are all safe to pack into your levels and level packs - it's 100% conflict-proof.
- It's possible to set up paraglider FoF triggers and removers, and it's possible to change their settings on the fly too.
- Setting up paragliders that can't be let go, delays before being able to let go of the paraglider, and changing these settings later using FoF triggers are all available.
- For FoF paraglider removers and changers, a unique sound will be played, which can be changed at your leisure.
- There is a lot of interoperability with the already-existing base game mechanics - springs, speed pads and wind sectors and FoFs are all fair game!
- Examples are also available, in case there's confusion about how everything works, as well as signs to help indicate paraglider spots.
3D Model
If you wish for the Paraglider to use a 3D model, download PAGL_MD3.7z, and add its contents into themdls/
folder inside your SRB2Kart folder. Then, open mdls.dat using a text editor, and add the following at the end of the file: PAGL PAGL/PAGL.md3 3.0 0.0
.Afterwards, you'll be seeing the paraglider in its full polygonal glory!
Documentation
- My dedicated server's console is getting spammed with configuration file creation messages, what's going on?
- The user who is running Kart may not have write permissions to the
luafiles
folder, meaningparaglider.cfg
can't be created. To fix this in a Linux dedicated, runchmod 775 luafiles
, or create the file manually usingtouch paraglider.cfg
within theluafiles
folder (normally within~/.srb2kart
). This is rectified in 1.0.1.
- The user who is running Kart may not have write permissions to the
Note: If the Paraglider pk3 is added directly as a resource in Zone Builder, it will throw a Lua error. It's safe to ignore and the script operates normally otherwise.
This removes paragliders immediately to prevent cheesing and plays a unique sound ("S3KD2S").
The sound can be changed by setting the linedef's backside texture to a sound name, e.g. "S3KBA".
This allows to change previously-set settings on
For example, you can make a section that disallows players from letting go, and then use this trigger to allow letting go in a safe area.
In addition, like glider removers, it plays a unique sound ("S224"), that can be changed by setting the linedef's backside texture to a sound name.
Check the example map (which will be MAP01) for examples on how to put triggers in levels, and see how they work and behave with Kart's existing mechanics. Make sure to load the Paraglider addon as well if you do so!
How to add glider triggers
- Create a FoF.
- The FoF sector needs to have sector special 64 (
Trigger Line Ex. (Anywhere in Sector)
). - The FoF linedef needs to be intangible. Linedefs 220 - 224 should work for this purpose.
- Within the FoF control sector, another linedef needs to be of type 443 (
Call Lua Function
). The front side upper and middle textures should havePARAGLID
andENABLE
respectively.
- Within the FoF control sector, another linedef needs to be 301 (
Each Time
). This is so the trigger always works with every player. - Make sure the
Each Time
linedef and the control sector share the same tag.
- The FoF sector needs to have sector special 64 (
How to add glider removers
The setup is the same as described with glider triggers, but instead of usingPARAGLID ENABLE
, you use PARAGLID REMOVE
.This removes paragliders immediately to prevent cheesing and plays a unique sound ("S3KD2S").
The sound can be changed by setting the linedef's backside texture to a sound name, e.g. "S3KBA".
How to set glider settings on the go through triggers
The setup is the same as described with glider triggers, but instead of usingPARAGLID ENABLE
, you use PARAGLID OPTIONS
.This allows to change previously-set settings on
PARAGLID ENABLE
triggers without having to have players redeploy.For example, you can make a section that disallows players from letting go, and then use this trigger to allow letting go in a safe area.
In addition, like glider removers, it plays a unique sound ("S224"), that can be changed by setting the linedef's backside texture to a sound name.
Parameters
Linedef Setting | Function | Description |
---|---|---|
[13] No Knuckles Flag | PARAGLID ENABLE | If set, the player's paraglider will deploy instantly, instead of waiting out the time before it is possible to deploy. |
[12] No Tails Flag | PARAGLID ENABLE PARAGLID OPTIONS | If set, the player will not be able to let go of their paraglider by holding Brake. |
Frontside Texture X Offset | PARAGLID ENABLE PARAGLID OPTIONS | Sets a delay, in tics, before the player can let go of their paraglider. |
Backside Texture Texture Name | PARAGLID REMOVE PARAGLID OPTIONS | Sets the sound name that will be played when a player's paraglider gets removed, or their options change, respectively. Defaults to S3KD2S and S224 , respectively. |
Check the example map (which will be MAP01) for examples on how to put triggers in levels, and see how they work and behave with Kart's existing mechanics. Make sure to load the Paraglider addon as well if you do so!
Here, playerMo = player.mo
Variables
State Control
Variable Name | Description |
---|---|
playerMo.willParaglide (bool) | Timer that increases until it reaches PG_STARTWINGTIMER. When done, this variable will be set to zero, while playerMo.paragliding will be set to true. |
playerMo.paragliding (bool) | When set to true, the paragliding logic is enabled for this player. |
Gameplay
Variable Name | Description |
---|---|
playerMo.letGoGliderTimer (int) | Timer used when a player is holding Brake (or overcharging with Acrobatics) while paragliding, increasing by one per tic up until LETGOGLIDERTIMER (which is TICRATE). |
playerMo.allowedToLetGoOfGlider (bool) | Controls if players can hold brake to let go of the glider. It will be true if it's the case, false otherwise. |
playerMo.ticsUntilLettingGoOfGlider (tic_t) | Controls when a player will be able to let go of the paraglider through the set delay. This will be leveltime + delay set, and the actual leveltime will be compared to, in order to know this. |
playerMo.springInfluence (int) | Timer that ticks up during the spring state, used when we want to enable gliding logic again. When it reaches SPRINGINFLUENCETIMER, and the player falls down, this is set to zero. It will also be set to zero if a spring is touched. |
playerMo.storedGlideMomz (fixed_t) | The momentum stored while paragliding, often obtained by going down or using an item. |
playerMo.targetFallRt (fixed_t) | The fall speed value of the player while paragliding. |
playerMo.startFallVel (fixed_t) | When a paraglider is deployed, this stores the player's initial momz they had before the deploy to be applied during the paraglider physics. |
playerMo.glideFinBuffer (tic_t) | Dictates "coyote time" - for how long the player can be on the ground with a paraglider before the paraglider goes away. Capped to PG_COYOTETIMETICS (5 tics) |
Controls
Variable Name | Description |
---|---|
playerMo.glideVerticalMovement (int) | It directs if the vertical movement should be upwards or downwards. Capped to FRACUNIT and -FRACUNIT by logic. |
player.invertParaglider (int) | Handles vertical input. It will be 1 for normal controls, and -1 for inverted controls. |
Internals
Variable Name | Description |
---|---|
playerMo.paraglideMobj (mobj_t) | Points to the player's paraglider mobj. |
player.holdingItemBTN (bool) | Checks if the player is holding the item button. |
Visuals and Sounds
Variable Name | Description |
---|---|
playerMo.visonlyStoredStates (int) | Indicates the visual status of the paraglider afterimages. From -1 (none) to 2 (highest possible). |
playerMo.wooshSoundCD (int) | A cooldown that gets set when the player moves up with enough momentum. It initiates the "woosh" sound when the player goes up. |
Functions
Anything not listed here should not be overridden or used, for the sake of the addon's stability.Function Name | Description |
---|---|
jglider.isMobjValidPlayer(mobj_t) | Simple check to know if the player and their mobj is valid. |
jglider.FindSoundByName(string) | Tries to find an sfx_ constant by name. |
jglider.GetSoundOrFreeslotFromString(string) | Uses FindSoundByName -- if it returns nil, then the sound name is freeslotted and this reference is passed by the function. |
jglider.spawnParagliderWithStartup(mobj_t, boolean (useDefaults)) | Designed to be used for player mobjs. Spawns a paraglider on the player with the associated paraglider startup. Set useDefaults to true to have the function set allowedToLetGoOfGlider and ticUntilLettingGoOfGlider to default values. (This is normally what you might want for interop, if needed.) |
jglider.createParaglider(mobj_t) | Designed to be used for player mobjs. Creates a paraglider to mobj_t's position, mimicking various of its properties. |
jglider.initParaglider(mobj_t) | Opens up the glider with the corresponding logic. Depending on the logic, playerMo.paragliding will need to be set to true. |
jglider.resetGliderStuff(mobj_t) | Designed to be used for player mobjs. Resets various paraglider-related variables. Used when a player falls down or gets hit. |
jglider.resetGliderValues(mobj_t) | Designed to be used for player mobjs. Resets paraglider-related variables. Internally used on deploy and when the paraglider is let go. |
jglider.getTurnRateGlider(player_t) | Returns the turn rate of the player's glider, based on their weight stat. |
Credits & Special Thanks
Made By:
Special Thanks:
- JugadorXEI: Lead programmer.
- minenice: Support programmer - laid a lot of groundwork reworking the physics and implementing extra useful features.
- Fayt: Artist - created the flats and midtextures used to indicate Paraglider jumps.
- Tiniest Turtles: Artist - created many of the sprites for the Paraglider.
- Mr. Logan: (Concept) Artist - Drafted and created the groundwork for the first Paraglider sprites and how they should look.
Special Thanks:
- Diggle: one of the Paragliders' first adopters ever since the first release candidates.
- Mustard and Mizu: helped test the Paragliders in early release candidates.
- AquaMonkey: encouraged me to finish this script for once and for all. Would probably have never been finished without their encouragement.
- Marsh: Provided helpful feedback regarding visuals.
- Also many thanks to everyone who helped test in Aqua's Karthouse's test servers!
Enjoy, and let me know if there's any questions, issues or concerns!