Basic stack inventory code
/// Add to stack
ds_stack_push(inv, other); // "other" being the other object (the item) involved in the collision
other.x=32*ds_stack_size(inv)*32; // X position on screen, not important otherwise
other.y=32; // Y position on screen, not important otherwise
/// Remove from stack
if (!ds_stack_empty(inv)){
n=ds_stack_pop(inv);
with (n)
instance_destroy();
}
Comments
0 B
|👍
/👎
0 B
|👍
/👎
0 B
|👍
/👎