Detect when a peasant returns a resource to the town hall?

jackall

You can change this now in User CP.
Reaction score
37
maybe check resources every .5 seconds and if they increase by a fixed amount (how much the peasant returns) and not from bounty or unsummon

just a suggestion
 

Azlier

Old World Ghost
Reaction score
461
Whenever a unit returns resources to the town hall, it is issued a very specific order id. This can be used to detect resource return, but it fails to be set off if the unit has another order queued to be done after dropping off the gold, such as constructing a house after turning in that 10 wood.

So yeah, a better method is needed. Maybe you could make your own resource gathering system to replace WC3's hard coded one. Replacing stuff allows for a lot more freedom, but it can be difficult to pull off.
 

Gwafu

Active Member
Reaction score
12
Well. I didn't used the crappy ingame build system. I made one myself, so I won't be using the ingame resource too.

/@ jackall

It's for a third resource system, so I can't possibly use gold/lumber because it will collide with the third resource.

/@ Azlier

I'll try to make a custom one, the question is, how to change the animation set of a unit without changing the unit?
 

Gwafu

Active Member
Reaction score
12
Okay, made the first part (harvesting) with right clicking then order to use Channel blah blah. The problem is, peons will cast the spell and hide even though another peon is already mining inside. Is there a way to make the others wait?
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
Couldn't you just have a trigger that detects when a unit of type peon comes within range of the town hall?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top