• 🏆 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!

Why this doesn't work?

Status
Not open for further replies.
Level 20
Joined
Jun 27, 2011
Messages
1,864
I have a problem with a trigger, why this doesn't work?
  • Chest Items Init
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Set Temp_Point = (Position of Chest 0008 <gen>)
      • Item - Create (Random level 1 Permanent item-type) at Temp_Point
      • Unit - Create 1 Dummy for Neutral Passive at Temp_Point facing Default building facing degrees
      • Unit - Order (Last created unit) to give (Last created item) to Chest 0008 <gen>
      • Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation( udg_Temp_Point )
      • -------- ------- --------
      • Set Temp_Point = (Position of Chest 0008 <gen>)
      • Item - Create (Random level 1 Artifact item-type) at Temp_Point
      • Unit - Create 1 Dummy for Neutral Passive at Temp_Point facing Default building facing degrees
      • Unit - Order (Last created unit) to give (Last created item) to Chest 0008 <gen>
      • Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation( udg_Temp_Point )
      • -------- ------- --------
      • Set Temp_Point = (Position of Chest 0008 <gen>)
      • Item - Create (Random level 1 Campaign item-type) at Temp_Point
      • Unit - Create 1 Dummy for Neutral Passive at Temp_Point facing Default building facing degrees
      • Unit - Order (Last created unit) to give (Last created item) to Chest 0008 <gen>
      • Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation( udg_Temp_Point )
Btw, the dummy unit have an inventory.
 
Level 25
Joined
Jul 10, 2006
Messages
3,315
The dummies aren't given items, and are then ordered to give items to another unit, which they can't do because the item isn't in their inventory.

Change it to:
Unit - Create dummy
Hero - Create (random level 1 permanent item-type) for (last created unit)

PS: I don't quite see the point of the trigger; why don't you just create the item for the Chest unit?
 
Level 20
Joined
Jun 27, 2011
Messages
1,864
The dummies aren't given items, and are then ordered to give items to another unit, which they can't do because the item isn't in their inventory.

Change it to:
Unit - Create dummy
Hero - Create (random level 1 permanent item-type) for (last created unit)

PS: I don't quite see the point of the trigger; why don't you just create the item for the Chest unit?

Thanks! C:
 
Status
Not open for further replies.
Top