Posted 22 December 2008 - 11:47 PM
Posted 22 December 2008 - 11:49 PM
Id love to explain it but you could always just use the search on the forums, and search: Inventory in the Tutorials&Examples section.
Posted 22 December 2008 - 11:51 PM
Perhaps you could use an array for each location of the inventory and then have an item snap to the closest avaiable location when the mouse button is released.
I want to know how to do kind've like a runescape type inventory that shows up while your playing the game. Please help me.
EDIT: lol exactly what he said while I was typing.
Edited by LaLaLa, 22 December 2008 - 11:52 PM.
Posted 24 December 2008 - 02:12 PM
Posted 24 December 2008 - 04:13 PM
Arrays are value's with index numbers, there are 2 types of arrays in GM;
1 dimensional, they have one index number.
2 dimensional, they have two index number.
Normally you would have to define things as following:
But a array goes like this:
variable[(index number here)]=0
And in a two dimensional array it would be this:
variable[(first index number),(second index number)]=0
The benefit of using arrays is that you can add more then one value to a single variable, thus making it not only more readable but also a lot easier to code.
Edited by T. Westendorp, 24 December 2008 - 04:16 PM.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users