For both of these you need to know about Actor*. For getting a clone, if there are no actors above it, you can use getactor to get the Actor* of the clone. For instance in your game, add this event to your menucursor actor.
menucursor -> Key Down X (repeat disabled) -> Script Editor
- Code: Select all
getactor(x,y)->r=0;
That uses getactor to set the r value of the actor to 0. You can use the same function to get animpos.
- Code: Select all
if(getactor(x,y)->animpos==0)
{
//
}
I'd suggest though using a position indexing scheme. You have a variable holding the position in the array. So when you move to the right column, it increases it by one, while moving down increases it by 2. If you edit the events, you can keep the cursor in bounds of the inventory, as well as use it to get the cloneindex of the actor (so you can insert items).