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

Message displays twice in a simple trigger

Status
Not open for further replies.
Level 6
Joined
May 26, 2010
Messages
212
I'm trying to make a map and have it to where the hero can only use item if he has the right level.
Heres my trigger
  • Dropping
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Hero level of (Hero manipulating item)) Less than (Item level of (Item being manipulated))
    • Actions
      • Hero - Drop (Item being manipulated) from (Hero manipulating item)
      • Game - Display to (Player group((Owner of (Hero manipulating item)))) the text: (You must be level + ((String((Item level of (Item being manipulated)))) + to get this item.))
When I test it, the Hero DOES drop it but it says the message twice, Anybody know how to fix this?
+rep if you do
 
Level 8
Joined
Dec 9, 2009
Messages
397
  • Untitled Trigger 001
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Hero level of (Hero manipulating item)) Less than (<) (Item level of (Item being manipulated))
        • Then - Actions
          • Set TempLoc = (Position of (Item being manipulated))
          • Item - Move (Item being manipulated) to TempLoc
          • Custom script: call RemoveLocation(udg_TempLoc)
          • Game - Display to (Owner of (Hero manipulating item)), at offset (0.00, 0.00) the text: Your level is too l...
        • Else - Actions
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
Change "Hero Manipulating Item" for "Triggering Unit" and change "Owner of Triggering Unit" for "Triggering Player".

Are you using any other system that may be triggering this? like a dummy inventory or something? You should add "Triggering Unit is A Hero Equal to True"

If any of the things suggested before by others players doesn't work, you'll have to "Set Temp_Loc -> Create Item Being Manipulated in Tem_Loc, Remove Item Being Manipulated, Remove Temp_Loc, Display Message".
 
That message isn't displayed twice just because of that trigger. You probably miss something small in your map, other than that trigger.

Anyways, this script should more look like this:
  • Dropping
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • ((Triggering unit) is a Hero) Equal to True
      • (Hero level of (Triggering unit)) Less than (Item level of (Item being manipulated))
    • Actions
      • Hero - Drop (Item being manipulated) from (Triggering unit)
      • Set force = (Player group (Triggering player))
      • Game - Display to force the text: (You must be level + ((String((Item level of (Item being manipulated)))) + to get this item.))
      • Custom script: call DestroyForce(udg_force)
Where 'force' is variable of type: player group
 
Level 9
Joined
Apr 26, 2011
Messages
403
1, check out if you have a copyed trigger that do same thing

2, try add debug message, and find out if any unusually thing happen:
Game - Display to (all player) the text: "Debug Msg: Trigger unit = "+name of triggering unit
Game - Display to (all player) the text: "Debug Msg: Trigger item = "+name of Item being manipulated
 
Status
Not open for further replies.
Top