Explosions

Functions


get_explosion_damage

sfall.h

array get_explosion_damage(int itemPid)

Returns an array of the minimum and maximum damage of the explosive item.


item_make_explosive

sfall.h

void item_make_explosive(int pid, int activePid, int minDamage, int maxDamage)
  • makes the specified item (pid) an explosive item like Dynamite or Plastic Explosives
  • maxDamage is optional
  • the item proto must be of the Misc Item type and have the Use action flag
  • using the function on an item that is already set as an explosive will override its previous settings
  • NOTE: this function does not work for pids of Dynamite and Plastic Explosives

Arguments:

  • activePid: for an item with an active timer, can be the same as the pid argument
  • minDamage: the minimum explosion damage
  • maxDamage: the maximum explosion damage

metarule2_explosions

int metarule2_explosions(int mode, int arg1, int arg2)

Was made as a quick-and-dirty hack to enable dynamic changes to some explosion parameters for ranged attacks. All changed parameters are automatically reset to vanilla state after each attack action.


set_attack_explosion_art

sfall.h

void set_attack_explosion_art(int x, int y)

Y not used and X is a misc frame ID (last 3 bytes, without object type) to use for the next explosion.


set_attack_explosion_pattern

sfall.h

void set_attack_explosion_pattern(int x, int y)

Currently Y is not used and X means: 1 - reduced explosion pattern (3 effects are spawned instead of 7), 0 - full pattern.


set_attack_explosion_radius

sfall.h

void set_attack_explosion_radius(int x)

Changes radius at which explosion will hit secondary targets for the next attack (from the experiments it is limited to something around 8 by the engine).


set_attack_is_explosion_fire

sfall.h

void set_attack_is_explosion_fire

If you call this right before using a weapon with fire damage type (e.g. in HOOK_AFTERHITROLL), it will produce explosion effects (and radius damage) just like “explosion” type, but all targets will still receive fire damage.


set_dynamite_damage

sfall.h

void set_dynamite_damage(int minDmg, int maxDmg)

Sets the minimum and maximum damage for Dynamite. Changed damage will be reset each time the player reloads the game.


set_explosion_max_targets

sfall.h

void set_explosion_max_targets(int x)

Sets the maximum number of additional targets for an explosion. Valid range: 1..6 (default: 6).


set_explosion_radius

sfall.h

void set_explosion_radius(int grenade, int rocket)

Sets a permanent radius of the explosion for grenades and/or rockets. Passing 0 means not changing the corresponding radius. Changed radius will be reset each time the player reloads the game.


set_plastic_damage

sfall.h

void set_plastic_damage(int minDmg, int maxDmg)

Sets the minimum and maximum damage for Plastic Explosives. Changed damage will be reset each time the player reloads the game.


This site uses Just the Docs, a documentation theme for Jekyll.