How to hide bodyparts in inventory.
qroft
12 Feb 2015, 20:05Hi 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...
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.
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
12 Feb 2015, 20:06Oh by the way... absolutely funny to have an object called HEAD and then...
>DROP HEAD
you dropped your head.
lol.
>DROP HEAD
you dropped your head.
lol.
Silver
12 Feb 2015, 20:16Alternatively you can just call a function that makes objects visible or not. Or make the child objects scenery objects.