Explosions


get_explosion_damage

sfall.h

array get_explosion_damage(itemPid)

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

This is a macro, you need to include sfall.h to use it.


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
  • activePid is for an item with an active timer, can be the same as the pid argument
  • the item proto must be “Misc Item” type and have “Use” action flag
  • minDamage/maxDamage are the minimum and maximum explosion damage
  • 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

This is a macro, you need to include sfall.h to use it.


metarule2_explosions

int metarule2_explosions(int arg1, int arg2)

Was made as a dirty easy hack to allow dynamically change some explosion parameters (ranged attack). All changed parameters are reset to vanilla state automatically after each attack action.


set_attack_explosion_art

sfall.h

void set_attack_explosion_art(x, y)

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

This is a macro, you need to include sfall.h to use it.


set_attack_explosion_pattern

sfall.h

void set_attack_explosion_pattern(x, y)

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

This is a macro, you need to include sfall.h to use it.


set_attack_explosion_radius

sfall.h

void set_attack_explosion_radius(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).

This is a macro, you need to include sfall.h to use it.


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.

This is a macro, you need to include sfall.h to use it.


set_dynamite_damage

sfall.h

void set_dynamite_damage(minDmg, maxDmg)

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

This is a macro, you need to include sfall.h to use it.


set_explosion_max_targets

sfall.h

void set_explosion_max_targets(x)

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

This is a macro, you need to include sfall.h to use it.


set_explosion_radius

sfall.h

void set_explosion_radius(grenade, 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.

This is a macro, you need to include sfall.h to use it.


set_plastic_damage

sfall.h

void set_plastic_damage(minDmg, maxDmg)

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

This is a macro, you need to include sfall.h to use it.