- Joined
- Mar 1, 2012
- Messages
- 22
Hey Guy. I wan make a trigger that when a player build a lumber mill or gold mine , then it will receive 1 lumber or 1 gold per second. Who can help me? Thanks
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
thetrigger

Events


Time - Every 1.00 seconds of game time

Conditions

Actions


Set loc = (Point(0.00, 0.00))


For each (Integer A) from 1 to 12, do (Actions)



Loop - Actions




Custom script: set bj_wantDestroyGroup = true




Unit Group - Pick every unit in (Units within 10000.00 of loc matching ((Unit-type of (Matching unit)) Equal to Knight)) and do (Actions)





Loop - Actions






Player - Set (Player((Integer A))) Current gold to (((Player((Integer A))) Current gold) + 1)




Custom script: set bj_wantDestroyGroup = true




Unit Group - Pick every unit in (Units within 10000.00 of loc matching ((Unit-type of (Matching unit)) Equal to Lumber Mill)) and do (Actions)





Loop - Actions






Player - Set (Player((Integer A))) Current lumber to (((Player((Integer A))) Current lumber) + 1)


Custom script: call RemoveLocation(udg_loc)
this should do
loc is point variable
thetrigger
Events
Time - Every 1.00 seconds of game time
Conditions
Actions
Set loc = (Point(0.00, 0.00))
For each (Integer A) from 1 to 12, do (Actions)
Loop - Actions
Custom script: set bj_wantDestroyGroup = true
Unit Group - Pick every unit in (Units within 10000.00 of loc matching ((Unit-type of (Matching unit)) Equal to Knight)) and do (Actions)
Loop - Actions
Player - Set (Player((Integer A))) Current gold to (((Player((Integer A))) Current gold) + 1)
Custom script: set bj_wantDestroyGroup = true
Unit Group - Pick every unit in (Units within 10000.00 of loc matching ((Unit-type of (Matching unit)) Equal to Lumber Mill)) and do (Actions)
Loop - Actions
Player - Set (Player((Integer A))) Current lumber to (((Player((Integer A))) Current lumber) + 1)
Custom script: call RemoveLocation(udg_loc)
Are you referring to my trigger ?Note: even the trigger have been turned on, what's the effect of turning it on once again? (answer: you turned it on twice)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)

If - Conditions


(RG_Group is empty) Equal to True

Then - Actions


Trigger - Turn on RG Loop <gen>

Else - Actions
