• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Change sprite based on amount

bobby299

New Member
Joined
Nov 11, 2009
Messages
20
Reaction score
0
Hi, I've been trying to add a new coin to my server but I cant really get it to work properly. I'm trying to understand where I change/edit what sprite at what amount.

Like 1 coin = this sprite. 10 coins = this sprite.

What I did was copy the existing gold coin and change the sprite. I did this in both Object builder and Item editor.

This is the result,

From Objectbuilder:
1720139841820.png1720139813187.png

ItemEditor:

1720139914272.png

Ingame:
1720140001501.png


So for some reason sprite number 4 is the one being displayed no matter how many coins that are in that pile.

Any help is much appreciated!
 
Okey, i don't really see that much difference though, exactly the same settings except that your is in 2 rows.
yeah? so not exactly the same lol
i think you are misunderstand how this works, it's nothing to do with the sprites and everything to do with the properties you set.

It's a good idea to
LUA:
right click -> duplicate
an existing object that does what you want then just swap the sprite out.
If you want coins, duplicate gold coins, if you want food then duplicate meat etc
 
yeah? so not exactly the same lol
i think you are misunderstand how this works, it's nothing to do with the sprites and everything to do with the properties you set.

It's a good idea to
LUA:
right click -> duplicate
an existing object that does what you want then just swap the sprite out.
If you want coins, duplicate gold coins, if you want food then duplicate meat etc
I know, I also think that you misunderstood what the question is.

But @Codinablack has already answered the question.

But incase you have further knowledge about this I more than happy to listen, the question is still this

"Question remains, where and what defines what sprite for what amount?"

For clarity, where is the code that defines that Sprite X is applied to Item Y when the amount reaches Z. And when Item Y's value increases to "C", it changes Sprite X to something else. That is what I'm looking for! =)
 
I know, I also think that you misunderstood what the question is.

But @Codinablack has already answered the question.

But incase you have further knowledge about this I more than happy to listen, the question is still this

"Question remains, where and what defines what sprite for what amount?"

For clarity, where is the code that defines that Sprite X is applied to Item Y when the amount reaches Z. And when Item Y's value increases to "C", it changes Sprite X to something else. That is what I'm looking for! =)
it seemed like you were stuck on why it was so essential that you need y = 2 so i thought i would clarify for you ^.^

and lol i deleted part of my reply by accident, i was saying i had a look in the server and client src but couldn't figure it out for you, sorry
 
Back
Top