Defineprojectile: Difference between revisions
Rasmusthorup (talk | contribs) No edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
Defines a projectile to be fired by the [[shoot]] command and its variants. | Defines a projectile to be fired by the [[shoot]] command and its variants. | ||
First, we must figure out a proper [[WORKSLIKE]] flag for our projectile. | |||
To determine the proper WORKSLIKE flag for your projectile, simply add the numbers for the various functions you'd like your projectile to have together. Obviously, some flags are not compatible. Note that either [[PROJECTILE_FLAG_HITSCAN]], [[PROJECTILE_FLAG_RPG]] or [[PROJECTILE_FLAG_KNEE]] must be part of your WORKSLIKE flag. | |||
If the velocity is too high (usually over 1000), clipping errors may increse drastically. Instead, set PROJ_VELMULT and a lower PROJ_VEL. | |||
To be able to use the [[ifwasweapon]] with custom RPG-type projectiles ([[PROJ_WORKSLIKE]] includes bit 2), make sure to include the [[PROJECTILE_FLAG_RPG_IMPACT]] flag (32768) in [[PROJ_WORKSLIKE]]. | |||
== Functions == | |||
To use this command, several things must be done. Take note of the different settings for projectiles: | To use this command, several things must be done. Take note of the different settings for projectiles: | ||
Line 35: | Line 45: | ||
*[[PROJ_FLASH_COLOR]] | *[[PROJ_FLASH_COLOR]] | ||
== Examples == | |||
Here is an example of a working user-defined projectile: | Here is an example of a working user-defined projectile: | ||
Line 76: | Line 62: | ||
In this example, the projectile has the following WORKSLIKE flags set: PROJECTILE_FLAG_NOAIM, PROJECTILE_FLAG_LOSESVELOCITY, PROJECTILE_FLAG_RPG and PROJECTILE_FLAG_BOUNCESOFFWALLS. This gives us an RPG-like projectile that doesn't automatically aim at enemies/players (we need this because the projectile in question fires in an arc), automatically slows down during flight, fires like an RPG and bounces off the walls. | In this example, the projectile has the following WORKSLIKE flags set: PROJECTILE_FLAG_NOAIM, PROJECTILE_FLAG_LOSESVELOCITY, PROJECTILE_FLAG_RPG and PROJECTILE_FLAG_BOUNCESOFFWALLS. This gives us an RPG-like projectile that doesn't automatically aim at enemies/players (we need this because the projectile in question fires in an arc), automatically slows down during flight, fires like an RPG and bounces off the walls. | ||
[[Category:EDuke32 specific commands]] | [[Category:EDuke32 specific commands]] | ||
[[Category:Projectile manipulation]] | [[Category:Projectile manipulation]] |
Revision as of 17:22, 20 February 2020
defineprojectile <tilenum> <function> <value>
Defines a projectile to be fired by the shoot command and its variants.
First, we must figure out a proper WORKSLIKE flag for our projectile.
To determine the proper WORKSLIKE flag for your projectile, simply add the numbers for the various functions you'd like your projectile to have together. Obviously, some flags are not compatible. Note that either PROJECTILE_FLAG_HITSCAN, PROJECTILE_FLAG_RPG or PROJECTILE_FLAG_KNEE must be part of your WORKSLIKE flag.
If the velocity is too high (usually over 1000), clipping errors may increse drastically. Instead, set PROJ_VELMULT and a lower PROJ_VEL.
To be able to use the ifwasweapon with custom RPG-type projectiles (PROJ_WORKSLIKE includes bit 2), make sure to include the PROJECTILE_FLAG_RPG_IMPACT flag (32768) in PROJ_WORKSLIKE.
Functions
To use this command, several things must be done. Take note of the different settings for projectiles:
- PROJ_WORKSLIKE
- PROJ_SPAWNS
- PROJ_SXREPEAT
- PROJ_SYREPEAT
- PROJ_DECAL
- PROJ_TRAIL
- PROJ_TXREPEAT
- PROJ_TYREPEAT
- PROJ_TOFFSET
- PROJ_TNUM
- PROJ_SOUND
- PROJ_ISOUND
- PROJ_VEL
- PROJ_VEL_MULT
- PROJ_EXTRA
- PROJ_EXTRA_RAND
- PROJ_DROP
- PROJ_CSTAT
- PROJ_CLIPDIST
- PROJ_SHADE
- PROJ_XREPEAT
- PROJ_YREPEAT
- PROJ_PAL
- PROJ_HITRADIUS
- PROJ_OFFSET
- PROJ_BOUNCES
- PROJ_BSOUND
- PROJ_RANGE
- PROJ_FLASH_COLOR
Examples
Here is an example of a working user-defined projectile:
defineprojectile 1653 PROJ_WORKSLIKE 6150 defineprojectile 1653 PROJ_SPAWNS EXPLOSION2 defineprojectile 1653 PROJ_VEL 1000 defineprojectile 1653 PROJ_EXTRA 300 defineprojectile 1653 PROJ_DROP -200 defineprojectile 1653 PROJ_ISOUND PIPEBOMB_EXPLODE defineprojectile 1653 PROJ_HITRADIUS 2560 defineprojectile 1653 PROJ_BOUNCES 5 defineprojectile 1653 PROJ_OFFSET 224 defineprojectile 1653 PROJ_CLIPDIST 24 defineprojectile 1653 PROJ_TRAIL SMALLSMOKE
In this example, the projectile has the following WORKSLIKE flags set: PROJECTILE_FLAG_NOAIM, PROJECTILE_FLAG_LOSESVELOCITY, PROJECTILE_FLAG_RPG and PROJECTILE_FLAG_BOUNCESOFFWALLS. This gives us an RPG-like projectile that doesn't automatically aim at enemies/players (we need this because the projectile in question fires in an arc), automatically slows down during flight, fires like an RPG and bounces off the walls.