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

Thunder Staff why doesn't it work?help

Status
Not open for further replies.
Level 5
Joined
Sep 1, 2022
Messages
86
Grants 200% increased mana regeneration, +36 to all stats, and a 35% chance on hit to release a 2000 damage chain lightning on attack. Does not stack.


2023-02-07_173006.jpg


What am I doing wrong?:
 

Uncle

Warcraft Moderator
Level 65
Joined
Aug 10, 2018
Messages
6,724
It looks like you don't fully understand how Events and Event Responses work.

A trigger can register multiple Events of your choosing. Each Event has it's own Event Responses which are variables that get set in response to an Event firing. In this case your only Event is A unit Acquires an item, which happens when an Item is picked up by a Unit. The only available Event Responses here will be ones related to the Unit that acquired the Item and the Item itself -> (Hero manipulating item), (Item being manipulated), (Triggering unit). You can also get other information like the Player that owns the Unit and the type of the Unit/Item.

So with that in mind, understand that there is no (Attacking unit) Event Response available to use here. Why? Because no unit was attacked. Your Event has absolutely nothing to do with attacking.

The solution is simple, use an Event related to attacking and in your Conditions check to see if the (Attacking unit) has your Thunder Staff item.
  • Events
    • Unit - A unit is attacked
  • Conditions
    • ((Attacking unit) has an item of type Zeus Thunder Staff) Equal to True
    • (Random integer number between 1 and 100) Less than or equal to 35
  • Actions
    • Set VariableSet location01 = (Position of (Attacking unit))
    • Unit - Create 1 DummySpellGenerator for (Owner of (Attacking unit)) at location01 facing Default building facing degrees
    • Custom script: call RemoveLocation(udg_location01)
    • Unit - Add Chain Lightning (Zeus Thunder Staff) to (Last created unit)
    • Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
    • Unit - Order (Last created unit) to Orc Far Seer - Chain Lightning (Attacked unit)
Note that this type of trigger is highly abusable because the Event happens when an attack starts. There's nothing stopping the player from ordering their unit to attack/stop/attack/stop repeatedly to fire the Event. The solution is to use a Damage Event like A unit Takes damage or a system like Bribe's Damage Engine which handles most things for you.

Also, remember that your Dummy unit needs to be able to cast the Chain Lightning spell without any issues, so the ability needs:
0 mana cost, 0 cooldown, 99999 cast range, valid Targets Allowed, no Requirements, etc.

Also, make sure your Dummy unit is based on the Locust unit with the following changes:
Movement Type = None, Speed Base = 0, Attacks Enabled = None, Model = None, Shadow = None.
 
Last edited:
Status
Not open for further replies.
Top