Need help with my game vol 2

Game Editor comments and discussion.

Need help with my game vol 2

Postby Pengaboy » Fri Jun 08, 2012 6:16 am

[edited at 15:38 9.06.2012]
hi everybody another +1 is waiting his/her owner
how to make this effect like:
i have cashsystem in my game but how to make that if i have 5000 cash
and cheapest house cost like 50000 then i cant buy it and my 5000 cash doest go away and also the house is not bought
so it shows me text like this: You don't have enough money to buy this house!

textactor : cash
variable : moneysystem (integer/global/array:no)

thanks for any help
Last edited by Pengaboy on Sat Jun 09, 2012 12:39 pm, edited 1 time in total.
If everything is possible, then its possible that something is impossible!
LoL!

Creating Games Is Art R E S P E C T I T !!!
http://i43.servimg.com/u/f43/13/13/31/96/displa10.gif
User avatar
Pengaboy
 
Posts: 34
Joined: Wed Jun 06, 2012 11:24 am
Location: somewhere in my dreams
Score: 1 Give a positive score

Re: Need help with my game vol 2

Postby MrJolteon » Fri Jun 08, 2012 6:45 am

Code: Select all
if(cash=<50000)
{
//Don't allow purchase
}

Or something like that
Owner of the #GameEditor IRC channel at esper.net
User avatar
MrJolteon
 
Posts: 1877
Joined: Sat Aug 09, 2008 3:25 pm
Location: Fifth Layer
Score: 75 Give a positive score

Re: Need help with my game vol 2

Postby SuperSonic » Fri Jun 08, 2012 1:03 pm

Actually, when the player tries to buy the house, do this:
Code: Select all
if(cash >= 50000)
{
    cash -= 50000;
    //Give house to player
}
:wink:
A tree never hits an automobile except in self-defence.

Want to use your joystick or controller with Game Editor? Check out my controller engine =D
User avatar
SuperSonic
 
Posts: 1444
Joined: Fri Sep 24, 2010 9:24 pm
Location: Anywhere
Score: 72 Give a positive score

Re: Need help with my game vol 2

Postby MrJolteon » Fri Jun 08, 2012 1:08 pm

Ah
Those symbols confuses me sometimes xD
Owner of the #GameEditor IRC channel at esper.net
User avatar
MrJolteon
 
Posts: 1877
Joined: Sat Aug 09, 2008 3:25 pm
Location: Fifth Layer
Score: 75 Give a positive score

Re: Need help with my game vol 2

Postby Pengaboy » Fri Jun 08, 2012 2:11 pm

a little more explaining or demo would be very useful
thnx :D
If everything is possible, then its possible that something is impossible!
LoL!

Creating Games Is Art R E S P E C T I T !!!
http://i43.servimg.com/u/f43/13/13/31/96/displa10.gif
User avatar
Pengaboy
 
Posts: 34
Joined: Wed Jun 06, 2012 11:24 am
Location: somewhere in my dreams
Score: 1 Give a positive score

Re: Need help with my game vol 2

Postby happyjustbecause » Fri Jun 08, 2012 3:47 pm

Code: Select all
if(cash >= 50000)
{
    cash -= 50000;
    //Give house to player
}


Well this just means:

Code: Select all
if(cash >= 50000) // if the player has greater than or equal to 50000 dollars, run the code below
{
    cash -= 50000; // this minuses the amount for the house
    //Give house to player
}


And maybe you could have something like this code to have text pop up, saying you can't buy it:

Code: Select all
if(cash >= 50000) // if the player has greater than or equal to 50000 cash, run the code below
{
    cash -= 50000; // this minuses the amount for the house
    //Give house to player
}
else // if player has less than 50000 cash
{
   CreateActor("Store_Text", "Can't Buy This", FORWARD); // This is if you had animations for your menu, rather than just text pop up
}
For small creatures such as we the vastness is bearable only through love.
-Carl Sagan

Night Knight Development Thread
User avatar
happyjustbecause
 
Posts: 268
Joined: Tue Jul 26, 2011 3:10 pm
Location: Frazier Park, Ca
Score: 15 Give a positive score

Re: Need help with my game vol 2

Postby SuperSonic » Fri Jun 08, 2012 9:27 pm

Yeah, there are many different methods to accomplish the task you want, but that's the basic code you'll have to use :P
A tree never hits an automobile except in self-defence.

Want to use your joystick or controller with Game Editor? Check out my controller engine =D
User avatar
SuperSonic
 
Posts: 1444
Joined: Fri Sep 24, 2010 9:24 pm
Location: Anywhere
Score: 72 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest