GDevelop - How To Make Object Change Direction Randomly (4 Directions)

This tutorial is about changing objects direction every 2 seconds randomly while moving. No video, because my screen recorder isn't working properly on my pc right now. Download Gdevelop file and assets HERE!


1. Modify initial variables 

2. Add a variable "Directions" or what you want it to be

3. Add these events (events 2-6 really matters) and you got a object that moves randomly! Ps. When you add force, damping is 0!
If you want that object can move not only up, down, left and right but every angle (360), you can do it like this:
You don't need variables

Change damping to 1!

Is there something you want to do with GDevelop, but you can't figure it out how to do that? Feel free to ask me and see if I can help you and make tutorial about it!

Comments

  1. I am making a 2d platformer game and I am making my main sprite a shooter
    And i have done everything the sprite is shooting only in one direction.and he is not shooting in the left direction

    ReplyDelete

Post a Comment