counters

Started by computerbynar, Sun 16/05/2004 22:01:51

Previous topic - Next topic

computerbynar

can i make counters, such as scores, life points, health,etc. How? And how do i have it be added to or subtracted from?

Scorpiorus

#1
This can be achieved by making a use of variables. Check out the AGS Beginner's FAQ

Example:

// main global script

int score = 0;
int life_points = 10;
int health = 100;


to add or substract:

score = score + 5; // will add 5 to score

health = health - 10; // will subtract 10 from health

TerranRich

Yes, please do check the BFAQ.
Status: Trying to come up with some ideas...

SMF spam blocked by CleanTalk