Returns an array of the minimum and maximum damage of the explosive item.
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
activePidis for an item with an active timer, can be the same as the
- 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
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.
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.
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.
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).
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.
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.
Sets the maximum number of additional targets for an explosion, valid range: 1..6 (default is 6).
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.
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.