Bullet Fire Effect

Running scripts on projectile impact

  1. In projectiles.json add a projectile type with impact scriptclasses, such as:
  "impact": {
      "scriptclasses": ["effect_fire"]
  1. Create the file effect_fire.js in scriptclasses/ for the Script-Repository, search for nearby players and call seteffect for each player:
function onCreated() {
    let players = Server.searchplayers({map:this.map, area:{x:this.x-2, y:this.y-2, w:4,h:4}});
    players.forEach(function(player) {
        player.seteffect(10, "hurt", {hp:1});
        player.aniarg1 = "effect_fire.bani";

See the projectile impact effect in action: ProjectileFire.mp4