• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece!🔗 Click here to enter!

Item ability cast triggering

Status
Not open for further replies.
Level 8
Joined
Jun 13, 2010
Messages
344
Hi,
I want to make an item when carried, giving a chance to cast Chain Lightning.
But I don't want the player to be able to just click the item and manually cast it.

How do I prevent a player from cast it manually?

  • Item Hammer of Storms
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Item-type of (Item carried by (Attacking unit) in slot 1)) Equal to Hammer of Storms (MH)
    • Actions
      • Set A_Caster = (Attacking unit)
      • Set A_SingleTarget = (Attacked unit)
      • Set A_Counter = (Random integer number between 1 and 10)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • A_Counter Less than or equal to 3
        • Then - Actions
          • Hero - Order A_Caster to use (Item carried by A_Caster of type Hammer of Storms (MH)) on A_SingleTarget
          • Game - Display to (All players) the text: yeee
        • Else - Actions
          • Do nothing
Now I know you can abuse it by spamming "stop", because the attack will be triggered even tho the attack ain't succesfully done.
 
Status
Not open for further replies.
Top