| Blockland Forums > Modification Help |
| Inventory Bug |
| (1/1) |
| Nexus:
I have been frustrated recently when I try to run the following test. --- Code: ---if(%player.currTool > -1) --- End code --- This always default to true if the player has not opened his/her inventory yet since their player has spawned. After opening the inventory, it works fine, but I need a way to check if the player has opened their inventory since they have spawned. Two possible solutions I see is by commanding the players to open/close their inventories when they spawn, but I do not know the commandToClient to do that, or I can find the function for opening the inventory, and when it is called set a client variable to true/false, so I know when it has been called. What is the command to toggle your inventory? |
| phflack:
you could package the spawning functions and then set a variable in them? |
| Nexus:
I already have that done, but in order for that to work, like I said in OP, i would also need to package the function for using inventory to tell the game when the player first opens inventory. I actually found a way around this. I'm using and ifObject test to see if the player's tool is real instead of just testing if the player is holding a tool. Locking now, because I forgot to lock this before. Imaginary tools for the fail... |
| Navigation |
| Message Index |