Hello everyone i,m new to the site and i,m looking for some help on a trigger i have been working
i have tried many different ways to go about this but maybe someone else can give me some advice on how to do it
what i,m trying to do is when a unit enters RegionA then order unit to pick up every item of type stone in RegionA and then order that unit to move to RegionB
now that you know what it is that i am trying to do maybe you will know what to do
sorry i don't know how to past my trigger but if someone could tell me then i will post it but i,ll just type it up now
my triggers
Trigger1
Event
unit - a unit enters regionA
Conditions
none
Actions
item - pick every item in regionA <gen> and do (Actions)
loop - Actions
if (all conditions are true) then do (then Actions) else do (else Actions)
if - conditions
(item-type of (picked item)) equal to stone
then - Actions
set item1 = item1 + 1
else - Actions
do nothing
(comment) this Action happens after pick every item
unit - order (triggering unit) to right-click ( random item in regionA <gen> matching ((item-type of (matching item) equal to stone))
Trigger2
Event
unit - a unit acquires an item
Conditions
(item-type of (item being manipulated)) equal to stone
Actions
set item1 = item1 - 1
if (all conditions are true) then do (then Actions) else do (else Actions)
if - conditions
item1 equal to 0
then - Actions
order (hero manipulating item) to move to (center of regionB <gen)
else - Actions
unit - order (hero manipulating item) to right-click ( random item in regionA <gen> matching ((item-type of (matching item) equal to stone))
i have tried many different ways to go about this but maybe someone else can give me some advice on how to do it
what i,m trying to do is when a unit enters RegionA then order unit to pick up every item of type stone in RegionA and then order that unit to move to RegionB
now that you know what it is that i am trying to do maybe you will know what to do
sorry i don't know how to past my trigger but if someone could tell me then i will post it but i,ll just type it up now
my triggers
Trigger1
Event
unit - a unit enters regionA
Conditions
none
Actions
item - pick every item in regionA <gen> and do (Actions)
loop - Actions
if (all conditions are true) then do (then Actions) else do (else Actions)
if - conditions
(item-type of (picked item)) equal to stone
then - Actions
set item1 = item1 + 1
else - Actions
do nothing
(comment) this Action happens after pick every item
unit - order (triggering unit) to right-click ( random item in regionA <gen> matching ((item-type of (matching item) equal to stone))
Trigger2
Event
unit - a unit acquires an item
Conditions
(item-type of (item being manipulated)) equal to stone
Actions
set item1 = item1 - 1
if (all conditions are true) then do (then Actions) else do (else Actions)
if - conditions
item1 equal to 0
then - Actions
order (hero manipulating item) to move to (center of regionB <gen)
else - Actions
unit - order (hero manipulating item) to right-click ( random item in regionA <gen> matching ((item-type of (matching item) equal to stone))