ID:179347
 
i got a var for gold .. gold =)
and i got a item ..gold coins
i have no idea how to make the amount of gold coins the same as the var gold...last time i tryed it blanked the gold counter i got in a stat bar

For the record..I mega noob
for(obj/gold in usr) //for all the gold coins in the users inventory
coins += 1 //add one to the amount of coins the user has


In other words for every time the proccess sees a gold coin in the users inventory, a variable gets added to
In response to unimatrix
unimatrix wrote:
for(obj/gold in usr) //for all the gold coins in the users inventory
coins += 1 //add one to the amount of coins the user has

In other words for every time the proccess sees a gold coin in the users inventory, a variable gets added to

That seems a poor solution, though. Most people won't want 138 of the same object in their inventory without some kind of grouping system.

Lummox JR
In response to Lummox JR
it was a sample. nOOb's are supposed to learn, you know, the old fashioned way?

anyway just add the del it thingy
Well what I did was make an object with a var/Value to store the ammount of gold in it. Then, when the user picks it up, it deletes the object and sends the ammount to the players total gold. And if the player wants to drop gold, they say Drop_Gold(ammount), and if they have enough, it will create a gold object with the value equal to the ammount dropped under the player (and of course subtract from their carring gold)... There are other ways to do this, this is just what I do.
In response to unimatrix
The way you help people, I'm supprised someone hasn't turned around and called you a newbie.
In response to Lummox JR
thanks for that Lummox JR and i got a grouping script :)