Ich brauche Hilfe....
es ist wahrscheindlich ne dumme Frage aber wie kann ich meinem Charakter Geld geben, das er ausgeben und auch wieder vermehren kann(finden, gewinnen usw..)
Ich komme nicht dahinter...bitte helft mir.
HILFE!! Wie kann ich meinem character Geld geben?
- DernetteEddy
- Süßwasserpirat
- Beiträge: 298
- Registriert: 30.06.2004, 00:31
Steht hier beschrieben:
http://www.adventuregamestudio.co.uk/
Unter Knowledge Base / AGS Problems and Solutions / ENTER Problems And solutions / Giving a Character Money
For some exact code (In case you have absolutely no idea), when Larry gets the debit card, use the command:
SetGlobalInt (1, 500);
(The 1 can be changed to any number if GlobalInt 1 is already being used for something).
Then, whenever Larry buys something, use this code:
SetGlobalInt (1, GetGlobalInt (1)-X);
where X is the amount you want do deduct.
Oh, by the way, another way to have money is to store the quantity in the inventory items themselves, i.e. coins. You can access the variable character[CHARID].inv[x], which is not just 1 or 0, but can actually store an integer.
http://www.adventuregamestudio.co.uk/
Unter Knowledge Base / AGS Problems and Solutions / ENTER Problems And solutions / Giving a Character Money
For some exact code (In case you have absolutely no idea), when Larry gets the debit card, use the command:
SetGlobalInt (1, 500);
(The 1 can be changed to any number if GlobalInt 1 is already being used for something).
Then, whenever Larry buys something, use this code:
SetGlobalInt (1, GetGlobalInt (1)-X);
where X is the amount you want do deduct.
Oh, by the way, another way to have money is to store the quantity in the inventory items themselves, i.e. coins. You can access the variable character[CHARID].inv[x], which is not just 1 or 0, but can actually store an integer.
Vielen Dank...
Vielen Dank für den Hinweis NetterEddy...ich habs Geschaft....Thanx..