• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Autocast Thunderclap?

Status
Not open for further replies.
Level 27
Joined
Jun 20, 2013
Messages
752
Hello, i'm trying to code an Autocast Thunderclap for a footman type unit, using Spiritual Touch as the dummy spell and Thunderclap to do the damage.

The Thunderclap is copied from the Hero version, and the damage and debuff timers reduced, the spell only uses cooldown values to control the use.

  • Giro de Alabarda
    • Acontecimientos
      • Unidad - A unit Inicia el efecto de una habilidad
    • Condiciones
      • (Ability being cast) Igual a Giro de Alabarda2
    • Acciones
      • -------- ------------------------------------------------------------------------------------------------- --------
      • -------- Getting the Spell constants --------
      • -------- ------------------------------------------------------------------------------------------------- --------
      • Unidad - Order Giro_Alabarda_Caster to Humano Rey de la Montaña: Trueno
 
Last edited:
Level 27
Joined
Jun 20, 2013
Messages
752
Thanks, after watching other spells, i managed to do something that works, uses Fury as the autocast because Touch Cooldown stops the caster until is ordered manually.

My main problem now is that casting the skill by hand causes all the units to cast at the same time and it lags the map, the second, i only want to do damage in a circular area, want to known if there is a simple way to do this without using Stom/Clap because these skills always have the deformation or debuff.

Edit-Added a testmap.

  • Giro de Alabarda
    • Acontecimientos
      • Unidad - A unit Inicia el efecto de una habilidad
    • Condiciones
      • (Ability being cast) Igual a Giro de Alabarda 1
    • Acciones
      • Set Giro_Alabarda_Caster = (Triggering unit)
      • Set Giro_de_Alabarda_Dummy = Daño de alabarda
      • Set Giro_Alabarda_Owner = (Owner of Giro_Alabarda_Caster)
      • Set Giro_Alabarda_Loc = (Position of Giro_Alabarda_Caster)
      • Unidad - Create 1 Giro de Alabarda (Dummy) for Giro_Alabarda_Owner at Giro_Alabarda_Loc facing Vista edificio predeterminada degrees
      • Unidad - Add a 1.50 second Genérico expiration timer to (Last created unit)
      • Unidad - Add Giro_de_Alabarda_Dummy to (Last created unit)
      • Unidad - Order (Last created unit) to Neutral - Golpear
      • Custom script: call RemoveLocation(udg_Giro_Alabarda_Loc)
 

Attachments

  • HalberdSpin.w3x
    71.8 KB · Views: 30
Last edited:
My main problem now is that casting the skill by hand causes all the units to cast at the same time and it lags the map, the second, i only want to do damage in a circular area, want to known if there is a simple way to do this without using Stom/Clap because these skills always have the deformation or debuff.

It looks like you're after the aesthetics of the thunderclap. Very well, keep most of the actions in your trigger in there, but instead of creating a dummy, you will create a special effect (with the Thunder Clap model) in the location variable and destroy it (effect) immediately.

  • Special Effect - Create a special effect ...
  • Special Effect - Destroy (last created special effect)
After doing that, you'll enumerate all the enemies of the triggering unit within the intended range and filter out which ones are to be damaged.
But, before doing that, you'll need this line of Custom Script:

set bj_wantDestroyGroup = true


  • Custom script: set bj_wantDestroyGroup = true
  • Unit Group - Pick every unit in (Units within 300.00 of Giro_Alabarda_Loc) and do (Actions)
    • Loop - Actions
    • // Do your actions here...
Resulting Trigger (In English):
  • Set Giro_Alabarda_Caster = (Triggering unit)
  • Set Giro_de_Alabarda_Dummy = Daño de alabarda
  • Set Giro_Alabarda_Owner = (Owner of Giro_Alabarda_Caster)
  • Set Giro_Alabarda_Loc = (Position of Giro_Alabarda_Caster)
  • Special Effect - Create a special effect at Giro_Alabarda_Loc using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
  • Special Effect - Destroy (Last created special effect)
  • Custom script: set bj_wantDestroyGroup = true
  • Unit Group - Pick every unit in (Units within 300.00 of Giro_Alabarda_Loc) and do (Actions)
    • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Picked unit) belongs to an enemy of Giro_Alabarda_Owner) Equal to True
          • ((Picked unit) is alive) Equal to True
        • Then - Actions
          • Unit - Cause Giro_Alabarda_Caster to damage (Picked unit), dealing 100.00 damage of attack type Spells and damage type Normal
        • Else - Actions
  • Custom script: call RemoveLocation(udg_Giro_Alabarda_Loc)
 
Level 7
Joined
Jan 23, 2011
Messages
350
También puedes usar Abanico de cuchillas de la guardiana como habilidad de daño.
PD: El mapa se laguea al usar muchas, porque se crean muchos dummies, esto puede evitarse usando un ÚNICO dummy en el mapa. O al menos, un único dummy por jugador

You could also use Fan of knives as dummy ability
PD: the map lags when you cast it with many units because you're creating many units at the same time, this could be avoided using one dummy unit per player on the map
 
Status
Not open for further replies.
Top