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

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