Make an almost pre determinated movement

  • Hello all :D

    Anyone can help me to make this object (lets call it Guardian) who moves up and down on the screen, but randomly? Like he is trying to avoid arrows.

    For example: move up to point Y = 600 and then move down to Y = 100, then to up again to Y = 600, and this time, he goes down to Y = 250 and then to Y = 550.

    I'd like to make this behavior kinda "random". But the guardian should not pass the Y = 600 point (let's say it's the wall) and Y = 100 (the floor)

    I don't know if I explained this clearly. Please comment :)

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Up? xD

  • Here we are. This is a simple .capx with a solution.

    It is not perfect and a more experienced Constructer could probably show us a better one. I know it could be simpler by changing the rotation, but that might not be the best if you want the character to face the same way. Or you might want to make it face the wait is going. Which then this isn't the best way. <img src="smileys/smiley2.gif" border="0" align="middle" />

    db.tt/29WGFoLJ

    Hope that helps!

  • Also up is lower than down on c2 coordinate system.

    Y = 200 is higher than Y = 400 ... Just to say

  • Thanks Dalek. It worked perfectly.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)