Dimenticare icon

Basic stack inventory code

Dimenticare | PRO | 05/28/15 03:22:22 PM UTC | 0 ⭐ | 10635 👁️ | Never ⏰ | []
Game Maker |

0 B

|

None

|

0 👍

/

0 👎

/// 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

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎