Forum Jump :

Author Message


Posts: 5
Rank:


Level: Member

Country: us
Location:
Occupation:
Age:
In-game name:

 
#1 Posted at 2014-04-23 13:28        
     
So I'm making a an RTS where you gather resources and build your army, blah blah every RTS ever. Essentially like Warfare with the High Command module. Anyway, I've created a variable called Mylumber that I want to generate over time when you capture an enemy Lumber Mill. It's easy enough to add to the variable with "Mylumber = Mylumber + 200" ,I just want this instance to occur throughout the life of the game. Lastly, I would prefer if this occurred in REAL time, not in-game time because I have a Rest system and I don't want the player to be able to "boost" by skipping ahead 6 hours. Any responses are greatly appreciated


Author Message


Posts: 317
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age:
In-game name: BrotherhoodOfHam

 
#2 Posted at 2014-04-23 15:33        
     
Hi :-)
You could have a loop to add your lumber while a certain condition is true:

while {true} do 
{
	MyLumber= MyLumber + 200;
	sleep 30;
};

Some delicious stuff:
3D marker script
Some WIP delicious stuff:
Modular Customization Interface

Advertisement


Author Message


Posts: 5
Rank:


Level: Member

Country: us
Location:
Occupation:
Age:
In-game name:

 
#3 Posted at 2014-04-23 16:29        
     
Thanks! I assume I'll have to create a public variable for it, but I'll work with it when I get home.


Author Message


Posts: 317
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age:
In-game name: BrotherhoodOfHam

 
#4 Posted at 2014-04-24 16:54        
     
Just out of curiosity will this be for MP?

Some delicious stuff:
3D marker script
Some WIP delicious stuff:
Modular Customization Interface