HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Peasant "Gather" Ability Trigger

01-05-2004, 02:40 PM#1
raejin
Is there any way to have a trigger that is checked each time a peasant either a) grabs some gold / lumber from a mine or tree, or b) returns a resource to a town hall? The closest I've gotten is

event: unit - a unit is issued an order targeting an object
condition: (issued order) equal to (order(harvest))

Which, unfortunately, only fires when the peasant is manually told to gather (instead of just rightclicking on the gold mine / tree), and only once when ordered, instead of every time the peasant does a round trip (which is what I want). Any ideas? I also tried

event: begins channelling an ability
event: begins casting an ability
event: starts the effect of an ability
event: finishes casting an ability
condition: (ability being cast) equal to (gather)

None of which seem to work, either. Feedback would be hawt, thanks in advance!
01-05-2004, 10:46 PM#2
Savage1
About the gold I do not know, unless there is a way to activate a trigger that is related to the amount of gold of a mine, maybe a real comparison where you say that when the mine loses X gold Y happens.
About lumber you could make an event like this
Events
A tree is attacked
Conditions
Attacking unit= peasant
Action
X (something happens)
01-05-2004, 11:03 PM#3
EnetheruAnuon
Try adding a trigger that runs everytime X amount of gold or lumber is added to your supplies.
01-07-2004, 04:16 PM#4
raejin
Every time cash is added is a bit risky, since that means the trigger will fire when people go creeping etc, which is not at all what I want.

So, bump! Lumber now works, but not gold, which is the important bit =/
01-07-2004, 06:35 PM#5
Shark
unit ordered [smart] :))))
unit-type of ordering unit [ peon]....
but it may fire every time u try to move it...
so try adding as much conditions as u can think of..

or...try adding gold mines to Regions (draw regions around a gold mine) and make a trigger...
E:unit leaves the region
C:leaving unit equals to peon
A: whatever u need.....
01-12-2004, 08:37 PM#6
EnetheruAnuon
Try this. Set it up so that it fires if 10 gold is added and there is a peon near the town hall.
01-12-2004, 08:40 PM#7
AllPainful
Well..

"Return Resources" is an ability of the townhall... can you set it up so that when THAT ability fires the trigger fires?

The gold in a goldmine is also an ability, maybe you can set it up so a trigger fires there too?
01-13-2004, 02:57 AM#8
Eriond
I made the same trigger for my Rings map a while back. You had a chance of finding a gem in with the gold. I made it so, that when the value of the players gold was not equal to the pre-set variable, so as to detect when it changed, I put if the gold was greater then vairable, give a chance for a gem and set the variable, if it was less just set the variable.
01-14-2004, 07:07 AM#9
RodOfNOD
I wish I could say more but i havent converted my old map to the new format so I cant even open it right now...

If i recall there was an event that was triggered. The best way to find its name and thus detect it is to make an event that catches ALL types of orders

so Unit Issued order target
no target
and point

then show the order string with game text.


Then set ur peons in motion and watch what shows and what doesnt.

Best I can do right now.. If you REALLY get stuck come to chat or email me. Ill see if I can help.