• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Sawmills and peasants (how to turn returned lumber into mana)

Status
Not open for further replies.
Level 1
Joined
Oct 27, 2010
Messages
5
Hi everyone!

I have a problem because they know how to do this trigger, I want to do is that when a peasant takes, for example, 20 of wood to a sawmill the player gets nothing from wood, but Sawmill win the same amount of mana by the same amount of wood bearing the farmer.
(The mill has 1,000 mana and want to make the peasants to lay wood in that mill his mana up)

Keep in mind that there will be many sawmills, so the trigger does not have to be programmed to select a sawmill.

Thanks for the help.

And sorry for the bad English, I'm using Google Translate :p
 
Level 1
Joined
Oct 27, 2010
Messages
5
Exactly, and the mill will get a mana equal to the amount of wood that supposedly the owner player would have to obtain.
 
Level 17
Joined
Jan 21, 2010
Messages
2,111
Yes, you can't detect how much the lumber mill returned amount of lumber, but you can restric the player to having only 1 lumber mill, and detect the player's lumber's income by using event player 1 red's lumber become greater than 0 (just search it, i didn't remembered the excact thing)
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
Is player's lumber constant? Meaning that removing the lumber income results in playing having no wood generation at all?

In this case and if there is enough lumber, you maybe could take the properties event, set a flag on this so the next "harvest" order is considered to be after having returned goods, therefore you get this ordered unit and pick the closest mill and when the lumber is empty (no more harvest order right after), watch out who has lost his order between lumber event and a 0-timer. Of course, you can also use this 2nd method in general.

The amount returned is determined by the player's new lumber on lumber event.

edit: When I think about it, picking units would even help to know if the lumber change was the result of harvesting, so you could even use lumber as a resource.
 
Status
Not open for further replies.
Top