Author Topic: Variable replacer to check a player's entire inventory.  (Read 920 times)

Need this to try and make an inventory system less goofy. As usual, I tried to throw things together without actually knowing what I was doing as registerSpecialVar(Player,"itemAll","%this.tool[0].uiName","%this.tool[1].uiName","%this.tool[2].uiName","%this.tool[3].uiName","%this.tool[4].uiName","setItem",0,1,2,3,4); which of course didn't work. If anyone could just provide me with a working form of this, I'd probably suck their richard.
And I have indeed tried just stacking the built in itemX variable, but 5 of them at once is apparently too much for the game to handle, not to mention that it's just silly and overly complicated.
« Last Edit: December 28, 2013, 06:49:47 PM by .::Taboo::. »

This belongs in coding help.

I'm not asking for help so much as asking for someone to do it for me. Thus, a request.

Honestly you'll get more help over there. That's where people that are willing to do this kind of stuff linger.

You really have not thought this out. How would this work? What would it be if you just displayed the variable to a client?
Would it be like Hammer Wrench Printer Bow None, or HammerWrenchPrinterBowNone, or what? I doubt there is an easier way to handle checking all 5 slots using VCE than just checking item1, item2, etc.

Honestly you'll get more help over there. That's where people that are willing to do this kind of stuff linger.
no, that's for existing projects and stuff. if he jsut drops by asking for people to make it he isn't going to get a good response - that's just how people try to handle things over there

registerSpecialVar(Player,"currentItem","%this.getMountedImage(0).uiName");

registerSpecialVar(Player,"item0","%this.tool[0].uiname");
registerSpecialVar(Player,"item1","%this.tool[1].uiname");
registerSpecialVar(Player,"item2","%this.tool[2].uiname");
registerSpecialVar(Player,"item3","%this.tool[3].uiname");
registerSpecialVar(Player,"item4","%this.tool[4].uiname");

Or

registerSpecialVar(Player,"itemAll","%this.tool[0].uiname SPC %this.tool[1].uiname SPC %this.tool[2].uiname SPC %this.tool[3].uiname SPC %this.tool[4].uiname");

If this one doesn't work, try removing the SPC's.
« Last Edit: December 30, 2013, 03:31:42 AM by Advanced Bot »

registerSpecialVar(Player,"itemAll","%this.tool[0].uiname SPC %this.tool[1].uiname SPC %this.tool[2].uiname SPC %this.tool[3].uiname SPC %this.tool[4].uiname");
Worked perfectly, thanks.