• 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.

[Trigger] Problem in my trigger.

Status
Not open for further replies.
Level 14
Joined
Nov 30, 2013
Messages
926
Hi guys, I making a trigger that do like this

-When a unit cast a "Throw" ability in other unit. It remove the item from the owner of casting unit and create a item into the targeted unit when the missile has hit the targeted unit
-When hitted by the Throw ability missile, It will make the targeted unit's mana restore.

Here's my problem
-After cast a throw ability in other unit. The item has created into the ground instead of created into the targeted unit's inventory.
-Haven't restore the targeted unit's mana after casting it.

  • Throw
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to Throw
    • Actions
      • Set ItemUnit = (Target unit of ability being cast)
      • Item - Remove (Item carried by (Casting unit) of type Magnet Key)
      • Hero - Create Magnet Key and give it to ItemUnit
      • Unit - Set mana of ItemUnit to 100.00%
      • Game - Display to (All players) the text: ((Name of (Owner of (Casting unit))) + ( has throw the item to + (Name of (Owner of ItemUnit))))
 
Level 14
Joined
Nov 30, 2013
Messages
926
There is no target unit in here.
  • (Target unit of ability being cast)
Use triggering unit instead of Casting unit.

Didn't work.

EDITED:

I finally fixed my trigger by creating a new trigger and do this.
  • Throw Set
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Throw
    • Actions
      • Set ItemUnit = (Target unit of ability being cast)
Anyway, Thanks for your help guys. :smile:
 
Last edited:
Didn't work.

EDITED:

I finally fixed my trigger by creating a new trigger and do this.
  • Throw Set
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Throw
    • Actions
      • Set ItemUnit = (Target unit of ability being cast)
Anyway, Thanks for your help guys. :smile:

This makes the spell not MUI since the other trigger fires when the spell ends there is a delay between the 2 which can cause the spell to fail if 2 or more units use it at the same time.
 
Level 13
Joined
Jul 16, 2012
Messages
679
  • Untitled Trigger 001
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Throw
    • Actions
      • Set TempUnit = (Triggering unit)
      • Set Target = (Target unit of ability being cast)
      • Item - Remove (Item carried by TempUnit of type Magnet)
      • Hero - Create Magnet and give it to Target
      • Unit - Set mana of Target to 100.00%
 

Attachments

  • blabla.w3x
    16.8 KB · Views: 35
Status
Not open for further replies.
Top