• 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!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

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