How to hide bodyparts in inventory.

qroft
Hi everyone, i do not know at this moment if there is a library for this, so i would like to
show you a nasty way on how to hide bodyparts in your inventory.

SITUATION
You got a player object called PLAYER.
You add a new child object to PLAYER called HEAD.

BUG SOLUTION
I found out that if you write into HEAD an alias like BIGHEAD, it is written like that in the inventory.
if you next ERASE that alias, save your project and restart the game you will see that the HEAD will not appear.
But if you look at the HTML code you will see that an empty LI tag was set up containing nothing.
If you click on that "nothing" space with your mouse, the HEAD variables appear.

CORRECT BUt NAST SOLUTION
You write a JAVASCRIPT that contains this...
   $("li:contains('Head')").hide();


This means that the LI containg your objects name will be hidden.
To be honest this is not the most beautiful way, but it works.

qroft
Oh by the way... absolutely funny to have an object called HEAD and then...

>DROP HEAD
you dropped your head.

lol.

Silver
Alternatively you can just call a function that makes objects visible or not. Or make the child objects scenery objects.

This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums