Wake Up & Sleep

Discussion in 'How Can I...?' started by PJamaLabs, May 21, 2017.

  1. PJamaLabs

    PJamaLabs Boxer

    Joined:
    Apr 27, 2017
    Messages:
    70
    Likes Received:
    13
    Hi I am struggling to get something working.

    I have an object which wakes up when the character is close to it. The object sits on a path. So when it wakes up it starts moving along the path.

    That section all works ok. However I want it to sleep when it is x distance away from you. However it wont sleep it just carries on.

    Anyone know why this would be?

    I have also tried without the path. Just giving the object velocity in the direction I want to go but the sleep just kicks in straight away and it never wakes up again. Has anyone ever used sleep? If you have please give an example of how you used it because I just cannot get it to function as expected.
     
    Last edited: May 21, 2017
  2. isthisrequired

    isthisrequired Boxer

    Joined:
    Jun 14, 2017
    Messages:
    74
    Likes Received:
    7
    I'm having a similar problem; my game is a portrait endless game, and I want the spawners to deactivate when the character gets within 500 pixels of them, but I am having issues with the sleep as well.
     
    Mr Goodcat likes this.
  3. tyooos

    tyooos Boxer

    Joined:
    Apr 3, 2019
    Messages:
    7
    Likes Received:
    0

Share This Page