• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Item trigger help

Status
Not open for further replies.
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.
 
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
 
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.
Back
Top