• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[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:
Level 29
Joined
Oct 24, 2012
Messages
6,543
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