• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[Trigger] GUI trigger drops me to desktop

Status
Not open for further replies.
Level 12
Joined
Feb 13, 2009
Messages
388
Hello, I was trying to make a simple "stacking" system without different "items for inventory" and "items for ground" (rune system) so I've written this.
However when I try to pick up "fruit" I am dropped to desktop without ANY error.

  • Events
    • Unit - A unit Acquires an item
  • Conditions
    • (Item-type of (Item being manipulated)) Equal to Fruit
  • Actions
    • Set pickedItemGround[(Player number of (Owner of (Triggering unit)))] = (Item being manipulated)
    • Hero - Drop pickedItemGround[(Player number of (Owner of (Triggering unit)))] from (Triggering unit)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • ((Triggering unit) has an item of type Fruit) Equal to True
      • Then - Actions
        • Set pickedItemcarried[(Player number of (Owner of (Triggering unit)))] = (Item carried by (Triggering unit) of type Fruit)
        • Item - Set charges remaining in pickedItemcarried[(Player number of (Owner of (Triggering unit)))] to ((Charges remaining in pickedItemcarried[(Player number of (Owner of (Triggering unit)))]) + (Charges remaining in pickedItemGround[(Player number of (Owner of (Triggering unit)))]))
        • Item - Remove pickedItemGround[(Player number of (Owner of (Triggering unit)))]
      • Else - Actions
        • Hero - Create Fruit and give it to (Triggering unit)
        • Item - Remove pickedItemGround[(Player number of (Owner of (Triggering unit)))]
Any help please? :)
 
What you are doing makes no sense.

Your hero picks up fruit.
Your hero drops the fruit.
Your hero does not have fruit.
You create a fruit and give it to the hero.
Your hero picks up fruit.
Your hero drops the fruit.
Your hero does not have fruit.
You create a fruit and give it to the hero.
Your hero picks um fruit.
....

The aquires item event triggers with all item additions to a hero, even items added via triggers (atleast for GUI).
 
I've already fixed it, so there's a small wait there (before check).
I don't like the only thing: I have to instantly switch the trigger off while I give the item and then back on, but it works ok for now.
 
Status
Not open for further replies.
Back
Top