• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Thunder Staff why doesn't it work?help

Status
Not open for further replies.
Level 6
Joined
Sep 1, 2022
Messages
91
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 73
Joined
Aug 10, 2018
Messages
7,866
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