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!
Edit: Correction, the Harvest order is issued by the unit when it delivers gold/lumber. Thanks @Ziadoma.
See my bottom post.
There's no Event to detect when a unit delivers gold/lumber.
However, you can detect changes in a player's gold/lumber, so you could possibly determine when they gain +10 gold and reward XP in response, however, that means the trigger will run regardless of what gave them the 10 gold. Lumber can vary in amount so that's an even bigger issue.
Long story short, a bug free solution is probably not possible without a fairly involved resource harvesting system.
I think if you order them to harvest the order "smart" is being used. But you need to check around with the orders yourself. But maybe something like this could work:
Gain XP
Events
Unit - A unit Is issued an order targeting an object
Conditions
((Triggering unit) is A Hero) Equal to True
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
I think if you order them to harvest the order "smart" is being used. But you need to check around with the orders yourself. But maybe something like this could work:
Gain XP
Events
Unit - A unit Is issued an order targeting an object
Conditions
((Triggering unit) is A Hero) Equal to True
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
"smart" is issued when you right click a Gold Mine/Tree.
"harvest" is issued if you order the unit to use the Gather ability on a Gold Mine/Tree.
"harvest" is also issued when you deliver the resources to a town hall.
So you'd want to add another Condition to check if the target of "harvest" is a town hall.
Gain XP
Events
Unit - A unit Is issued an order targeting an object
Conditions
(Issued order) Equal to (Order(harvest))
((Triggering unit) is A Hero) Equal to True
((Target unit of issued order) is A town-hall-type unit) Equal to True
Perhaps you could even sync this up with a system that detects when a player's gold/lumber changes. Then you'd be able to detect the exact amount that was harvested and be able to vary the rewarded XP based on that amount.
I checked if there was any specific trigger @Uncle but I didn't find it so I thought could do it by conditions but was in doubt about what it would be. Yes and at the time the unit delivers the resource @Ziadoma I was looking at adapting the mechanics of your empire earth to improve unit attributes such as damage, defense etc. thanks for the help
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.