Page 1 of 1

"soldiers that you can by meny"

PostPosted: Sun Dec 17, 2006 5:30 pm
by saabian
Hi everyone!

After som hard work and practice with Gimp, GE and some other handy programs i decided to start with my first game for gp2x.
Its my first game so it will be quite simple but i hope to learn a lot more about game development.
The game will be a kind of war game, were your goal is to reach the other side of the battlefield by kill all the enemies standing in your way. To do so you need to buy a lot of (expensive) soldiers to help you, the more enemys you kill the more money you get.

So, any ideas of how to get money (points) for each enemy that you kill? and would it be possible to create some kind of "soldiers that you can by meny" in the corner and make it possible for the player to choose and buy the soldiers he like? like a strategy-game.

By the way, thanks for a great forum, the best sense the swedish dreamcast forum "dreamcast.nu" :P

PostPosted: Thu Dec 21, 2006 11:54 am
by makslane
Create the money variable (Actor variable, so will be hold the money per actor).
When you collide with some resource thats can give you more money, makes:

Code: Select all
money += collide.value; //Value is a actor variable too


When you collide with the soldiers, check if you have enough money to buy it. If you have, decrease the amount by the soldier value:

Code: Select all
if(money >= collide.value)
{
  money -= collide.value;
}