This thread is a few years old. Some details may refer to an earlier version of Visionaire Studio. Current tutorials
OK! working now with Lee's most recent effortNo problem mate.and not getting the error anymore.Thanks guys!
@ Lee: Okay thanks for the info mate. I was trying the piece of code i was posting here and it worked for me though. Just checked the Data Structure table and there is no any other field having the Value in it so i suppose it should be fine in this case. ( there are only fields like InterfaceValues, ObjectValues )I think that's the problem. Don't forget that you could technically type the wrong kind of data structure field into something.@ Joe: Glad it finally works
Values["example"].ConditionValue
-- or
Conditions["example"].ValueIntWould it be possible to just set value +/-1 if the character gets an item or loses itIssue is actually solved, but yes it's possible, but not much point as you can actually as shown in the final working solution I provided just query the amount of entries in the item table belonging to the active character. tablemaxn(table_name) or #table_name or #(table_name) will return the integer value of the amount of entries belonging to the table. If there are no entries then it will return 0 otherwise it will return the total amount of entries. It's something I often use when I need to iterate through some table with a for loop.
Then you could just the "If value = 0" ?
local itm = game.CurrentCharacter.CharacterItems -- store current inventory items in a variable
for i = 1, #itm do -- iterate from index value 1 to total amount of items in inventory
print itm[i]:getName() -- print the name of each item in the inventory
endThis thread is closed because nobody has replied for more than a year. Feel free to ask your question in a new thread.
New threadDeponia, The Whispered World and more than 160 other games were made with Visionaire Studio. The free version covers up to 25 scenes. For more scenes there is Visionaire Studio PRO from €75, and to sell your game the Indie Bundle for €99.
Through December 1: all licenses 30% off, for example the Indie Bundle for €69.30 instead of €99. Applied automatically at checkout.