How to destroy object

Discussion in 'Programming' started by Misisko, Oct 11, 2019.

  1. Misisko

    Misisko Member

    Joined:
    Oct 11, 2019
    Posts:
    2
    Hi,
    I would like to ask. I am making objects by this command:
    mp_grid_add_instances(global.grid, obj_wall, true);

    Please, can you advice me, how could I destroy objects added by that command?

    Thank you
     
  2. TheouAegis

    TheouAegis Member

    Joined:
    Jul 3, 2016
    Posts:
    6,889
    That doesn't create objects, what it does is set the value of a cell in a pathfinding grid to 1. To clear that particular cell, you use mp_grid_clear_cell().
     
  3. Misisko

    Misisko Member

    Joined:
    Oct 11, 2019
    Posts:
    2
    Ok, thanks I'll try that
     
  4. Yal

    Yal GMC Memer GMC Elder

    Joined:
    Jun 20, 2016
    Posts:
    3,703
    Also, to destroy object instances, use instance_destroy().
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice