Display Multiple Items

Started by DCillusion, Sat 08/11/2003 04:14:59

Previous topic - Next topic

DCillusion

I had a question earlier about having different amounts of the same item (7 coins for example) that was answered beautifully.

However, I'm not sure how to display the amount to the player

Option 1: Coin x "value" reads beside the item in the inv screen.

Option 2: "clicking" on the coin in the inv screen displays the value in a text box.

Ishmael

#1
1: Make a label to the GUI, and in the Global Rep_Ex, put:

string moneynum;
StrFormat(moneynum,"%d",character[EGO].inv[x ]); // I'm not 100% sure of the syntax, so check the manual if this doesn't work. Replace the x with the inv item number
SetLabelText(GUI, LABEL, moneynum); // Replace the GUI with the GUI's name and LABEL with the coin label number.

2: Just use in the Look at Inv:

Display("You have %d coins.", character[EGO].inv[x ]); // here too, replace x with the coin inv item number, also, you can take the spare space after it away
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

SMF spam blocked by CleanTalk