instance_destroy() doesn't allow game to compile

Discussion in 'Game Design, Development And Publishing' started by Century, Apr 22, 2019.

  1. Century

    Century Member

    Joined:
    Apr 22, 2019
    Posts:
    16
    I am running the most recent version of gamemaker studio 2 and I am using the tutorial on Youtube (the one made by YoYo). I have entered the following code in to the events tab exactly as it is represented in the video, but I get an error, the video does not. Any ideas as to why this is occurring?

    Code:

    if (instance_exists(obj_player))
    {
    move_towards_point(obj_player.x,obj_player.y,spd);
    }

    image_angle = direction;

    if (hp <= 0) instance_destory(self);

    NOTE: This is one of the examples.
     
  2. Joshua Hotchin

    Joshua Hotchin Member

    Joined:
    Jan 19, 2017
    Posts:
    40
    Can you link to the video please?
     
  3. Century

    Century Member

    Joined:
    Apr 22, 2019
    Posts:
    16


    There is also a timestamp
     
  4. flerpyderp

    flerpyderp Member

    Joined:
    Apr 26, 2018
    Posts:
    205
    It's important to check for typos, end of de story.
     
    BattleRifle BR55 likes this.
  5. Century

    Century Member

    Joined:
    Apr 22, 2019
    Posts:
    16
    What do you mean? Is there a typo?
     
  6. SnortySnoopy

    SnortySnoopy Member

    Joined:
    Apr 25, 2018
    Posts:
    212
    He was pointing out that it is instance_destroy() not instance_destory().
     

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