Page 1 of 1

Sell-Buy

PostPosted: Thu Apr 06, 2006 4:07 pm
by Phil
Hi,how can I make the cahracter to buy?
You know he enters a Bulding and there is a list of objects,
and he can buy.

PostPosted: Fri Apr 07, 2006 12:01 am
by DilloDude
Say you have a variable 'money'. You have a textNumber displaying the amount. You have an actor that says 'food: $50'. On mouse button down->left->food, write
Code: Select all
if (money>50)
{
    CreateActor("food", "food", no parent, no path, 0, 0, false);
    money-=50;
}

You can also use another event to trigger this, like keyDown or collision.