A FireCustomBullets: Difference between revisions

From Eternity Wiki
Jump to navigationJump to search
(New page: '''FireCustomBullets''' (string ''soundname'', int ''accuracy'', int ''tracers'', int ''dmgfactor'', int ''dmgmod'')<br> ==Usage== FireCustomBullets is a parameterized player weapon code...)
 
No edit summary
 
(8 intermediate revisions by 4 users not shown)
Line 1: Line 1:
'''FireCustomBullets''' (string ''soundname'', int ''accuracy'', int ''tracers'', int ''dmgfactor'', int ''dmgmod'')<br>
{{Codepointer |
 
description=FireCustomBullets is a parameterized player weapon codepointer. This codepointer can be used for the construction of custom player bullet weapons. The sound, accuracy, number of tracers, and randomized damage range of the tracers are all selectable via the argument fields. |
==Usage==
usage='''FireCustomBullets''' (''soundname'', ''accuracy'', ''tracers'', ''dmgfactor'', ''dmgmod'', ''flashstate''[, ''horizontal'', ''vertical''[, ''pufftype'']]) |
 
parameters=*soundname: The "nice name" of the sound to play.  See [[sound|the sound EDF block]] for how to define this.
FireCustomBullets is a parameterized player weapon codepointer. This codepointer can be used for the construction of custom player bullet weapons. The sound, accuracy, number of tracers, and randomized damage range of the tracers are all selectable via the argument fields. It is possible to recreate any of the other bullet attacks in the game using this pointer, as well as create many totally new ones.
*''accuracy'': Select accuracy type:
 
**'''always''': Always accurate on every shot.
===Parameters===
**'''first''': Accurate on first fire only ("never" accurate afterward)
 
**'''never''': Never accurate (5-degree horizontal spread with no vertical error)
*soundname: The "nice name" of the sound to play.  See [[ESOUNDS]] for how to define this.
**'''ssg''': Super Shotgun accuracy (10-degree horizontal spread with 5-degree vertical error)
*accuracy: Select accuracy type:
**'''monster''': Monster accuracy (20-degree horizontal spread)
**1: Always accurate
**'''custom''': custom accuracy. Use ''horizontal'' and ''vertical'' arguments to specify the spread.
**2: Accurate on first fire only ("never" accurate afterward)
*''tracers'': Number of bullet tracers to fire.
**3: Never accurate (moderate horizontal spread with no vertical error)
*''dmgfactor'': Damage factor. Damage formula is: ''dmgfactor'' * ((rnd%''dmgmod'') + 1))
**4: Super Shotgun accuracy (wide horizontal spread with moderate vertical error)
*''dmgmod'': Damage modulus (Clamped into range of 1 to 256)  
**5: Monster accuracy (very wide horizontal spread)
*''flashstate'': optional flash state to display. If 0, it will use weapon's defined flash state.
*tracers: Number of bullet tracers to fire.
*''horizontal'': if ''accuracy'' is '''custom''', specify the '''overall''' horizontal spread in degrees (as opposed to spread each side of firing thing's current angle). Keep in mind the distribution is not uniform; it's concentrated on the centre, just like the preset spread types.
*dmgfactor: Damage factor. Damage formula is: dmgfactor * ((rnd%dmgmod) + 1))
*''vertical'': also if ''accuracy'' is '''custom''', specify the overall vertical spread. Same distribution as for ''horizontal''.
*dmgmod: Damage modulus (Clamped into range of 1 to 256)
*''pufftype'': name of [[EDF]] [[pufftype]] to spawn when hitting walls. Default is the one designated for the current game.
 
|notes=It is possible to recreate any of the other bullet attacks in the game using this pointer, as well as create many totally new ones. |
[[Category:Codepointers]]
seealso=
*[[CustomPlayerMelee]]
*[[FirePlayerMissile]]}}

Latest revision as of 01:35, 7 April 2020

Description

FireCustomBullets is a parameterized player weapon codepointer. This codepointer can be used for the construction of custom player bullet weapons. The sound, accuracy, number of tracers, and randomized damage range of the tracers are all selectable via the argument fields.

Usage

FireCustomBullets (soundname, accuracy, tracers, dmgfactor, dmgmod, flashstate[, horizontal, vertical[, pufftype]])

Parameters

  • soundname: The "nice name" of the sound to play. See the sound EDF block for how to define this.
  • accuracy: Select accuracy type:
    • always: Always accurate on every shot.
    • first: Accurate on first fire only ("never" accurate afterward)
    • never: Never accurate (5-degree horizontal spread with no vertical error)
    • ssg: Super Shotgun accuracy (10-degree horizontal spread with 5-degree vertical error)
    • monster: Monster accuracy (20-degree horizontal spread)
    • custom: custom accuracy. Use horizontal and vertical arguments to specify the spread.
  • tracers: Number of bullet tracers to fire.
  • dmgfactor: Damage factor. Damage formula is: dmgfactor * ((rnd%dmgmod) + 1))
  • dmgmod: Damage modulus (Clamped into range of 1 to 256)
  • flashstate: optional flash state to display. If 0, it will use weapon's defined flash state.
  • horizontal: if accuracy is custom, specify the overall horizontal spread in degrees (as opposed to spread each side of firing thing's current angle). Keep in mind the distribution is not uniform; it's concentrated on the centre, just like the preset spread types.
  • vertical: also if accuracy is custom, specify the overall vertical spread. Same distribution as for horizontal.
  • pufftype: name of EDF pufftype to spawn when hitting walls. Default is the one designated for the current game.

Examples

No examples given.

Notes

It is possible to recreate any of the other bullet attacks in the game using this pointer, as well as create many totally new ones.

See also