ID:151177
 
How do you make it so that something looks diff on the ground and not in your inven?
On 2/24/01 12:07 am Shane wrote:
How do you make it so that something looks diff on the ground and not in your inven?

Easy!

obj/verb/get()
src.icon_state = "inven"
//rest of get code

obj/verb/drop()
src.icon_state = ""
//rest of drop code
In response to Spuzzum
Im sorry i dont get what you mean...Is that the whole code?
Thanx
Shane
In response to Shane
On 2/24/01 1:00 am Shane wrote:
Im sorry i dont get what you mean...Is that the whole code?

Yep... what this does is switch the icon state when you pick something up.

I did this in the legendary, albeit outdated, PantsQuest. When you looked at shoes on the map, you'd see a pair of sandals taking up the whole 32x32 tile. But when you wore them, they'd just appear as a tiny change to your character's picture.
In response to Shane
On 2/24/01 1:00 am Shane wrote:
Im sorry i dont get what you mean...Is that the whole code?

You need the get code, too. That's just an example of switching the icon states.

Here's a full example:

obj/verb/get()
src.icon_state = "inven"
if(src.Move(usr))
usr << "You pick up [src]."
oview()-usr << "[usr] picks up [src]."
else
usr << "You can't pick that up."
In response to Spuzzum
Ok, thank you so much! I got it now! :)
Thanx
Shane