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

Item trigger help

Status
Not open for further replies.
Level 9
Joined
Apr 3, 2008
Messages
700
Generic unit event
Hero Aquires an item

Boolean Comparison
Hero - If hero has an item of type *
And
Hero - If hero has an item of type **
And
<...>

Remove Item of type * from hero
Remove Item of type ** from hero
<...>
Hero - Create item for Triggering unit.
 
Level 18
Joined
Sep 27, 2005
Messages
2,069
Hero aquires an item
item being manipulated = item 1
set a(boolean variable) = true

Hero drops item
Item being manipulated = item 1
set a = false

Hero aquires an item
item being manipulated = item 2
set b(boolean variable) = true

Hero drops item
Item being manipulated = item 2
set b = false

Hero aquires an item
item being manipulated = item 3
set c(boolean variable) = true

Hero drops item
Item being manipulated = item 3
set c = false

Every 0.1 seconds of game
if a and b and c = true
remove item of type 1 2 and 3 from hero
create item 4
 
Level 1
Joined
Jul 10, 2008
Messages
7
Hero aquires an item
item being manipulated = item 1
set a(boolean variable) = true

Hero drops item
Item being manipulated = item 1
set a = false

Hero aquires an item
item being manipulated = item 2
set b(boolean variable) = true

Hero drops item
Item being manipulated = item 2
set b = false

Hero aquires an item
item being manipulated = item 3
set c(boolean variable) = true

Hero drops item
Item being manipulated = item 3
set c = false


Every 0.1 seconds of game
if a and b and c = true
remove item of type 1 2 and 3 from hero
create item 4


you can do:
Event
Hero adquires an item
Condition
Action
If /Then /Else (Multiple functions)
Condition
Item being manipulated = item 1
Action
set a = true
If /Then /Else (Multiple functions)
Condition
Item being manipulated = item 2
Action
set 2 = true
If /Then /Else (Multiple functions)
Condition
Item being manipulated = item 3
Action
set c = true

----------------------

Event
Hero drops an item
Condition
Action
If /Then /Else (Multiple functions)
Condition
Item being manipulated = item 1
Action
set a = false
If /Then /Else (Multiple functions)
Condition
Item being manipulated = item 2
Action
set 2 = false
If /Then /Else (Multiple functions)
Condition
Item being manipulated = item 3
Action
set c = false



and you can replace:
Every 0.1 seconds of game
if a and b and c = true
remove item of type 1 2 and 3 from hero
create item 4
for:

Event
Hero adquires an item
Condition
a and b and c = true
Action
remove item of type 1 2 and 3 from triggering unit
create item 4 for triggering unit

it is better becouse you can use "triggering unit"
 
Status
Not open for further replies.
Top