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

[Trigger] Unit drops...

Status
Not open for further replies.
Level 6
Joined
May 19, 2007
Messages
177
i need help with a trigger that when a unit dies of a certain type i can drop an item from a item table:confused: i can do most of it except the item part
 
Level 9
Joined
Jul 1, 2005
Messages
393
thank you! I needed this too! now I don't have to go ask!

but I ran into some more trouble trying!

What I want to happen:

  • Events unit dies
I keep having a problem specifying the array which the tutorial does NOT cover.

My Variable:

  • Variable Name: Peasant
  • Variable Type: Unit
  • Array? No
  • Size: 1
In the Triggers menu I decide that I want to use the following:

Unit - Unit Specific Event

This takes me to menu of Unit Dies. But Unit is red underlined.
So I pick Unit and I go into variables.
I pick the peasant.
All of the trigger windows close down, and the selection tool pallette comes out.
So I pick the peasant again.
Nothing happens and the trigger i just tried to make resets.

and tags stopped working for me again. I don't know why.
 
Last edited by a moderator:
Level 6
Joined
Mar 2, 2006
Messages
306
specific unit works only for preplaced units which you select using the button you pressed (whick creates a "generated variable")

you have two solutions:
solution one: trigger fires for every unit and check who it fired for...
  • Events
    • A unit dies
  • Conditions
    • (Triggering Unit) equal to MyUnit [color=blue]<- a variable[/color]
solution two: you CAN use specific unit event for your variable. here's how: make your trigger WITHOUT EVENTS and once the variable is assigned, use "add this event to [this trigger]" action to register an event.
 
Status
Not open for further replies.
Top