| Blockland Forums > Modification Help |
| Coding Request: Stacking Items |
| (1/3) > >> |
| Mr.Noßody:
So, I'm making a health restoring device that's aim is for you to be able to carry more than one, in only one item slot. Maybe even having x? in the Icon image indicating how many are stacking. But I'm at a loss or coding when trying to tackle this so I need help here. Or is this Imposable? |
| Red_Guy:
Impossible? no - definately possible. The actual scripting to keep track of count is not that hard. when the item is picked up, set %client.Tools[%toolNumber]Count=<whateverCountYouWant> then when the player uses the item: %client.Tools[%toolNumber]Count --; if (%client.Tools[%toolNumber]Count < 1) ... drop the item else equip the item again but im not sure how you would update the icon to display a number. |
| Mr.Noßody:
How bout like a bottom print that tells you how many you have? |
| RedGajin:
--- Code: ---commandToClient(%obj.client,'bottomPrint',"\c6:Device Amount: \c3" @ %obj.getDeviceAmount() @ "%", 3); --- End code --- This? Except where it says device put the name of your object. |
| Plornt:
getDeviceAmount()? |
| Navigation |
| Message Index |
| Next page |