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!
This system will fix the bug where your workers will instant mine when the town hall object is too close to the mine. It adds a delay before your workers can mine more.
I was inspired by this thread three hours ago to make this system as well I felt that this was needed since there could be forgotten threads where people never received help so the people that need help with this type of system now can get that help hopefully. Plus it's unique/original.
The only system that had something even close to this was http://www.hiveworkshop.com/forums/spells-569/gold-mine-distance-remover-v1-01-a-223835/?prev=search%3Dmine%26d%3Dlist%26r%3D20 .
[trigger=Trigga's]
Dat DPGM Configs
Events
Time - Elapsed game time is 0.00 seconds
Conditions
Actions
Set A_Dat_DR_DefaultTime = 20
Set A_Dat_DR_DefaultCountDown = 1
Set A_Dat_DR_DistanceCheck = 250.00
[/trigger]
[trigger=]
Dat DR
Events
Unit - A unit Is issued an order targeting an object
Conditions
(Issued order) Equal to (Order(resumeharvesting))
Actions
Set tempinteger = (Custom value of (Triggering unit))
Set tempunit = (Target unit of issued order)
-------- Cleaning unit references. . . --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
A_Dat_DR_Hall[tempinteger] Not equal to No unit
Then - Actions
Set A_Dat_DR_Hall[tempinteger] = No unit
Else - Actions
Set A_Dat_DR_Hall[tempinteger] = tempunit
Set Dat_DR_Spot1 = (Position of tempunit)
Set tempunit = (Triggering unit)
Set tempinteger = (Custom value of tempunit)
Unit - Turn collision for tempunit Off
Set Dat_DR_Spot2 = (Position of tempunit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Distance between Dat_DR_Spot1 and Dat_DR_Spot2) Less than or equal to A_Dat_DR_DistanceCheck
(tempunit is in Dat_DR_Group) Equal to False
Then - Actions
Unit - Order tempunit to Hold Position
Unit Group - Add tempunit to Dat_DR_Group
Set A_Dat_DR_TimeLeft[tempinteger] = A_Dat_DR_DefaultTime
Set A_Dat_DR_GroupNumber = (A_Dat_DR_GroupNumber + 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
A_Dat_DR_GroupNumber Equal to 1
Then - Actions
Countdown Timer - Start Dat_DR_Timer as a Repeating timer that will expire in 0.10 seconds
Else - Actions
Else - Actions
Custom script: call RemoveLocation(udg_Dat_DR_Spot1)
Custom script: call RemoveLocation(udg_Dat_DR_Spot2)
[/trigger]
[trigger=]
Dat Loop
Events
Time - Dat_DR_Timer expires
Conditions
Actions
Unit Group - Pick every unit in Dat_DR_Group and do (Actions)
Loop - Actions
Set tempunit2 = (Picked unit)
Set Dat_DR_Spot1 = (Position of A_Dat_DR_Hall[(Custom value of tempunit2)])
Set Dat_DR_Spot2 = (Position of tempunit2)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Distance between Dat_DR_Spot1 and Dat_DR_Spot2) Less than or equal to 50.00
Then - Actions
Set tempinteger = (Custom value of tempunit2)
Set A_Dat_DR_StartCount[tempinteger] = True
Unit - Hide tempunit2
Else - Actions
Custom script: call RemoveLocation(udg_Dat_DR_Spot1)
Custom script: call RemoveLocation(udg_Dat_DR_Spot2)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
A_Dat_DR_TimeLeft[(Custom value of tempunit2)] Less than or equal to 0
Then - Actions
Set A_Dat_DR_GroupNumber = (A_Dat_DR_GroupNumber - 1)
Set tempinteger = (Custom value of tempunit2)
Set A_Dat_DR_StartCount[tempinteger] = False
Unit - Unhide tempunit2
Unit - Turn collision for tempunit2 On
Unit - Order tempunit2 to Harvest Nearby Gold
Unit Group - Remove tempunit2 from Dat_DR_Group
Else - Actions
Set tempinteger = (Custom value of tempunit2)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
A_Dat_DR_StartCount[tempinteger] Equal to True
Then - Actions
Set A_Dat_DR_TimeLeft[tempinteger] = (A_Dat_DR_TimeLeft[tempinteger] - A_Dat_DR_DefaultCountDown)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
A_Dat_DR_GroupNumber Less than or equal to 0
Then - Actions
Countdown Timer - Pause Dat_DR_Timer
Else - Actions
[/trigger]
Keywords:
a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,And now you know your alphabet!,!,Tal0n,Dat,C3,-,@,#,$,%,^,&,*,(,),1,2,3,4,5,6,7,8,9,0,epic,ca
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
A_Dat_DR_GroupNumber Less than or equal to 0
Then - Actions
Countdown Timer - Pause Dat_DR_Timer
Else - Actions
This way, you don't have a delay of 0.10 seconds, and makes more sense.
Questions: Why you use a timer? You dont need to make a variable timer, it's unnecessary, use "every X game time seconds", and then turn off trigger when needed.
Why you have another timer?
Countdown Timer - Start Dat_DR_Timer2 ????? as a Repeating timer that will expire in 0.10 seconds
???????
Why another group?
Set A_Dat_DR_GroupNumber2 = (A_Dat_DR_GroupNumber2 + 1)
Okay added, getting rid of unit references is very important since we're dealing with something more limited then WC3's in-game stuff... That's WC3's allowed RAM usage before the fatal and/or freezes/problems occur.
This way, you don't have a delay of 0.10 seconds, and makes more sense.
Questions: Why you use a timer? You dont need to make a variable timer, it's unnecessary, use "every X game time seconds", and then turn off trigger when needed.
Why you have another timer?
I like the delay so nope not changing it. Timer's are better then the game play timer because you can turn it off as well have more control over it. Oh, and its more accurate as well while running a bit smoother.
It was there for testing purposes, I either forgot or was too lazy to remove those.... I think it was rather both.
Edit:
Amazingly I somehow quoted your entire post in near-perfect English without even noticing it until now. . . Cool.
New version soon, will have fixed all reported bugs and speed-focused requests.
Okay added, getting rid of unit references is very important since we're dealing with something more limited then WC3's in-game stuff... That's WC3's allowed RAM usage before the fatal and/or freezes/problems occur.
It's so your workers don't instant-mine. Well people should use it to fix 200 or lower distance with workers mining gold mines, people should use it now in this day and age since only custom resource systems could fix this in the past, now we have two choices.
I did not really understand when to use this system.
Also please add the description to your spell submission, so people don't have to search for it in thread.
I did not really understand when to use this system.
Also please add the description to your spell submission, so people don't have to search for it in thread.
Well you use it when your either annoyed of not being able to select your worker or you want to get rid of the bug where it mines three/twice times as fast. Okay.
- Honestly I still don't understand how you fix a "bug" with it. Workers just mine the gold and bring it back, that's normal.
- Doesn't work correctly. Going close to gold mine with the tank made the worker completly stop.
- Your prefixes are inconsequent. Use the same abbreviation for all. Also for your "temp" variables.
- Need of descriptive comments.
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.