Defineprojectile: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
Mblackwell (talk | contribs)
mNo edit summary
BlasterDRP (talk | contribs)
mNo edit summary
Line 115: Line 115:
defineprojectile 1653 [[PROJ_CLIPDIST]] 24
defineprojectile 1653 [[PROJ_CLIPDIST]] 24


defineprojectile 1653 [[ROJ_TRAIL]] SMALLSMOKE
defineprojectile 1653 [[PROJ_TRAIL]] SMALLSMOKE





Revision as of 13:51, 24 December 2004

defineprojectile <tilenum> <function> <value>

Defines a projectile to be fired by the shoot command and its variants.

To use this command, several things must be done. First, include the following defines somewhere before your defineprojectile lines:

define PROJ_WORKSLIKE 1

define PROJ_SPAWNS 2

define PROJ_SXREPEAT 3

define PROJ_SYREPEAT 4

define PROJ_SOUND 5

define PROJ_ISOUND 6

define PROJ_VEL 7

define PROJ_EXTRA 8

define PROJ_DECAL 9

define PROJ_TRAIL 10

define PROJ_TXREPEAT 11

define PROJ_TYREPEAT 12

define PROJ_TOFFSET 13

define PROJ_TNUM 14

define PROJ_DROP 15

define PROJ_CSTAT 16

define PROJ_CLIPDIST 17

define PROJ_SHADE 18

define PROJ_XREPEAT 19

define PROJ_YREPEAT 20

define PROJ_PAL 21

define PROJ_EXTRA_RAND 22

define PROJ_HITRADIUS 23

define PROJ_VEL_MULT 24

define PROJ_OFFSET 25

define PROJ_BOUNCES 26

define PROJ_BSOUND 27


Second, we must figure out a proper WORKSLIKE flag for our projectile. The WORKSLIKE flag can be determined by looking at the following defines:


define WORKSLIKEBULLET 1

define WORKSLIKERPG 2

define WORKSLIKEBOUNCESOFFWALLS 4

define WORKSLIKEBOUNCESOFFMIRRORS 8

define WORKSLIKEKNEE 16

define WORKSLIKEWATERBUBBLES 32

define WORKSLIKENOENEMYHITS 128

define WORKSLIKESPIT 256

define WORKSLIKECOOLEXPLOSION1 512

define WORKSLIKEBLOOD 1024

define WORKSLIKELOSESVELOCITY 2048

define WORKSLIKENOAIM 4096

define WORKSLIKERANDDECALSIZE 8192


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.


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: WORKSLIKENOAIM, WORKSLIKELOSESVELOCITY, WORKSLIKERPG and WORKSLIKEBOUNCESOFFWALLS. 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.

Please take care not to set a projectile's velocity over 1000. Instead, set PROJ_VELMULT and a lower PROJ_VEL.