• 🏆 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!

Coding for Continual Income

Status
Not open for further replies.
Level 2
Joined
Sep 13, 2006
Messages
13
I attempted to learn from Bomber Command as they had a trigger that would meet this need, but I couldn't get the code for the continual income (Presumed to be JASS)
Any assistance would be appreciated...
Clarification: ownership of a certain type of building would periodically provide income
 
Last edited:
income triggers are very simple.

Set a variable to represent the number of "income buildings" the player has. ( x )

then make a trigger that sets the variable higher every time the player builds that building.

and when a building dies and it equals to that type of building, then set the variable lower.

then you make a periodic trigger that gives the player gold for every income building it has, so it would be like,

say each building will give 20 gold every 10 seconds.
so it would be, 20( x ) to the player every 10 seconds.
 
Level 5
Joined
Jun 26, 2008
Messages
130
or you could just do do every 10 seconds count structures of type owned by player x 20 add to players gold/lumber w/e resource u want, no variables needed...

Edit: I don't see why you'd need jass for that.
 
Last edited:
Status
Not open for further replies.
Top