• 🏆 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!

[Trigger] Hack n Slash Features (Need Help)

Status
Not open for further replies.
Level 8
Joined
Jun 13, 2010
Messages
344
I am working on a simple Hack n Slash game.
One of the main features is I have removed the Attack Damage of units and given them an ability instead named 'Attack'.

When they press the 'Attack' ability, which is based on Thunder Clap (Any other suggestions?), they will make a simple attack animation. A Dummy Unit is summoned and casts Breath of Fire in a desired size of area.

My issue is you may use the ability 'Attack' and then cancel it right before the animation. This will lead to no mana cost, but still summon the Dummy Unit.

How do I prevent the 'Attack' ability being abused?

My triggers:

  • Attack Button
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Attack
    • Actions
      • Set A_Unit = (Triggering unit)
      • Set A_Point = (Position of A_Unit)
      • Set A_Point1 = (A_Point offset by 150.00 towards (Facing of A_Unit) degrees)
      • Unit - Create 1 Dummy Unit for (Owner of A_Unit) at A_Point facing (Facing of A_Unit) degrees
      • Set A_Unit1 = (Last created unit)
      • Unit - Add Attack (Dummy Unit) to A_Unit1
      • Set A_Integer = (Strength of A_Unit (Include bonuses))
      • Unit - Set level of Attack (Dummy Unit) for A_Unit1 to A_Integer
      • Unit - Order A_Unit1 to Neutral - Breath Of Frost A_Point1
      • Custom script: call RemoveLocation (udg_A_Point)
      • Custom script: call RemoveLocation (udg_A_Point1)
  • Add Timer to Dummy Unit
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Dummy Unit
      • (Ability being cast) Equal to Attack (Dummy Unit)
    • Actions
      • Set A_Unit = (Triggering unit)
      • Unit - Add a 0.01 second Generic expiration timer to A_Unit
  • Remove Dummy Unit
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Dummy Unit
    • Actions
      • Set A_Unit = (Triggering unit)
      • Unit - Remove A_Unit from the game
 
Change the event to A unit starts the effect of an ability.

You could combine the cast an ability actions and starts the effect actions into one trigger, hopefully resolving the issue. From my perspective, since its' a dummy unit with instant cast time, you might as well just make it a global unit that does not expire (die), somewhat like a proxy.
 
Level 8
Joined
Jun 13, 2010
Messages
344
You could combine the cast an ability actions and starts the effect actions into one trigger, hopefully resolving the issue. From my perspective, since its' a dummy unit with instant cast time, you might as well just make it a global unit that does not expire (die), somewhat like a proxy.

Hmm.. Does the global unit work for MUI?

I think I made it work, I made it Starts an effect as Dat-C3 said:
Change the event to A unit starts the effect of an ability.

I am certain I tried it and it could still be abused though.. Well whatever if it works, it works. :D
 
Status
Not open for further replies.
Top