Test: Difference between revisions
Line 37: | Line 37: | ||
| '''PROJ_SXREPEAT''' || Used to set the x size of an [[actor]] [[spawn]]ed on impact. <value> is the size you wish to set the [[spawn]]ed [[actor]]'s x to. | | '''PROJ_SXREPEAT''' || Used to set the x size of an [[actor]] [[spawn]]ed on impact. <value> is the size you wish to set the [[spawn]]ed [[actor]]'s x to. | ||
|- | |- | ||
| '''PROJ_SYREPEAT''' || | | '''PROJ_SYREPEAT''' || Used to set the y size of an [[actor]] [[spawn]]ed on impact. <value> is the size you wish to set the [[spawn]]ed [[actor]]'s y to. | ||
|- | |- | ||
| '''PROJ_DECAL''' || | | '''PROJ_DECAL''' || Used to set the tilenum of any decal spawned by the projectile, i.e. bullet holes. <decal tilenum> is the tilenum of the decal used. Only works with bullet projectiles. | ||
Doesn't work with bullet type projectiles fired by actors other than players. | |||
|- | |- | ||
| '''PROJ_TRAIL''' || | | '''PROJ_TRAIL''' || Used to set the tilenum of any trail sprites spawned. <trail tilenum> is the tilenum of the trail sprites spawned. | ||
|- | |- | ||
| '''PROJ_TXREPEAT''' || | | '''PROJ_TXREPEAT''' || The x size of the trail used by the projectile. Note that if the trail is an [[actor]] with a size specified in its code (e.g. by a [[sizeat]] command) then the specified size will override the one you give it. | ||
|- | |- | ||
| '''PROJ_TYREPEAT''' || | | '''PROJ_TYREPEAT''' || The y size of the trail used by the projectile. Note that if the trail is an [[actor]] with a size specified in its code (e.g. by a [[sizeat]] command) then the specified size will override the one you give it. | ||
|- | |- | ||
| '''PROJ_TOFFSET''' || | | '''PROJ_TOFFSET''' || The y offset of the trail spawned by the [[PROJ_TRAIL]] variable. Positive numbers move the sprite down. | ||
|- | |- | ||
| '''PROJ_TNUM''' || | | '''PROJ_TNUM''' || The maximum number of trails that an individual projectile can spawn. By default, RPG (non-hitscan) type projectiles will spawn trails even if TNUM is not set. But bullet type (hitscan) projectiles will not spawn any trails unless TNUM is given a non-zero value. | ||
The way it works, is that if TNUM value is set to 2, then it will spawn 2 of the sprites on the same location. The default value is 1 if a trail is set for the projectile. | |||
|- | |- | ||
| '''PROJ_SOUND''' || | | '''PROJ_SOUND''' || Used to play a [[sound]] when a projectile is fired. For bullet projectiles this is the [[sound]] played on impact. <fire sound> is the name of the [[sound]] you wish to play. | ||
|- | |- | ||
| '''PROJ_ISOUND''' || | | '''PROJ_ISOUND''' || Used to play a [[sound]] when a projectile impacts a surface. This is ignored on bullet-type projectiles. <impact sound> is the name of the [[sound]] you wish to play. | ||
Set PROJ_ISOUND to -1 to disable impact sounds. | |||
|- | |- | ||
| '''PROJ_VEL''' || | | '''PROJ_VEL''' || Used to set the velocity of a projectile. <velocity> is the speed of the projectile. Values over 1000 are not encouraged. Use [[PROJ_VEL_MULT]] to go at higher speeds. | ||
|- | |- | ||
| '''PROJ_VEL_MULT''' || | | '''PROJ_VEL_MULT''' || Used to set multiply velocity of a projectile (causes an artificial acceleration). <velocity multiplier> is the amount to multiply by. | ||
On a given tic the projectile will move PROJ_VEL_MULT times, for example, if you set PROJ_VEL_MULT to 1, it will only move at its current velocity (stored in its sprite's [[xvel]] / [[zvel]]) once per tic. | |||
|- | |- | ||
| '''PROJ_EXTRA''' || | | '''PROJ_EXTRA''' || |
Revision as of 09:22, 21 February 2020
Test 1
defineprojectile <tilenum> PROJ_WORKSLIKE <flag value>
Used to set flags for projectile function.
Note that the damage on impact bit (32768) must be set on the WORKSLIKE of any RPG type projectile (i.e. nonhitscan) for which the projectile itself does damage, as opposed to the damage being caused only by the hitradius.
Add all the desired flags together, and use that value for <flag value>. This works similar to cstat.
defineprojectile <tilenum> PROJ_SPAWNS <spawn tilenum>
Used to spawn an actor on impact.
Set <spawn tilenum> to -1 to spawn nothing, otherwise <spawn tilenum> defaults to SMALLSMOKE.
Doesn't work with bullet-type projectiles fired by actors other than the player.
defineprojectile <tilenum> PROJ_SXREPEAT <spawn xrepeat>
Used to set the x size of an actor spawned on impact.
Where <spawn xrepeat> is the size you wish to set the spawned actor's x to.
Test 2
PROJ_WORKSLIKE | Used to set flags for projectile function. Add all the desired flags together, and use that value for <flag value>. This works similar to cstat.
Note that the damage on impact bit (32768) must be set on the WORKSLIKE of any RPG type projectile (i.e. nonhitscan) for which the projectile itself does damage, as opposed to the damage being caused only by the hitradius. |
PROJ_SPAWNS | Used to spawn an actor on impact. Set <value> to -1 to spawn nothing, otherwise <value> defaults to SMALLSMOKE.
Doesn't work with bullet-type projectiles fired by actors other than the player. |
PROJ_SXREPEAT | Used to set the x size of an actor spawned on impact. <value> is the size you wish to set the spawned actor's x to. |
PROJ_SYREPEAT | Used to set the y size of an actor spawned on impact. <value> is the size you wish to set the spawned actor's y to. |
PROJ_DECAL | Used to set the tilenum of any decal spawned by the projectile, i.e. bullet holes. <decal tilenum> is the tilenum of the decal used. Only works with bullet projectiles.
Doesn't work with bullet type projectiles fired by actors other than players. |
PROJ_TRAIL | Used to set the tilenum of any trail sprites spawned. <trail tilenum> is the tilenum of the trail sprites spawned. |
PROJ_TXREPEAT | The x size of the trail used by the projectile. Note that if the trail is an actor with a size specified in its code (e.g. by a sizeat command) then the specified size will override the one you give it. |
PROJ_TYREPEAT | The y size of the trail used by the projectile. Note that if the trail is an actor with a size specified in its code (e.g. by a sizeat command) then the specified size will override the one you give it. |
PROJ_TOFFSET | The y offset of the trail spawned by the PROJ_TRAIL variable. Positive numbers move the sprite down. |
PROJ_TNUM | The maximum number of trails that an individual projectile can spawn. By default, RPG (non-hitscan) type projectiles will spawn trails even if TNUM is not set. But bullet type (hitscan) projectiles will not spawn any trails unless TNUM is given a non-zero value.
The way it works, is that if TNUM value is set to 2, then it will spawn 2 of the sprites on the same location. The default value is 1 if a trail is set for the projectile. |
PROJ_SOUND | Used to play a sound when a projectile is fired. For bullet projectiles this is the sound played on impact. <fire sound> is the name of the sound you wish to play. |
PROJ_ISOUND | Used to play a sound when a projectile impacts a surface. This is ignored on bullet-type projectiles. <impact sound> is the name of the sound you wish to play.
Set PROJ_ISOUND to -1 to disable impact sounds. |
PROJ_VEL | Used to set the velocity of a projectile. <velocity> is the speed of the projectile. Values over 1000 are not encouraged. Use PROJ_VEL_MULT to go at higher speeds. |
PROJ_VEL_MULT | Used to set multiply velocity of a projectile (causes an artificial acceleration). <velocity multiplier> is the amount to multiply by.
On a given tic the projectile will move PROJ_VEL_MULT times, for example, if you set PROJ_VEL_MULT to 1, it will only move at its current velocity (stored in its sprite's xvel / zvel) once per tic. |
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 |