how to make constantly moving actors move randomly across the screen without leaving the screen

RVvDRVvD Member, PRO Posts: 36

I have tried using Timer: Every 1 second: Change Velocity function using random(0,400) but they don't stay on screen...

Then I have tried adding the constraining x and y attributes if x is> 410 if x is< 10 and the same for y then change velocity random(0,400) to try and get them back on screen.

So I was wondering, is there possibly a way to have a table full of positions that they can all cycle through randomly without stopping until they are pressed? Anyone know how that would work? Or if it does?

Thanks, Rachel.

Comments

  • SocksSocks London, UK.Member Posts: 12,822

    Is it just a random left to right movement you need or should the actor also move up and down (so essentially anywhere on the screen) ?

  • SocksSocks London, UK.Member Posts: 12,822

    I'm not sure if this is of any use, I made it for something else, it gives you four lines (when you are laying out your scene in Creator) move these lines around to set the limits for an actor that will randomly move around the screen, but only within these limits. It's just a quick way of setting the extent of a random movement.

    So, just drag the lines around to set the area - then hit Preview.

    It's a Mac file.

  • RVvDRVvD Member, PRO Posts: 36

    Sorry for the late reply, but thankyou so much Socks, that looks great! :)
    That has definitely helped me figure out how to get the effect I need, thank you so much <3

  • SocksSocks London, UK.Member Posts: 12,822

    @RVvD said:
    Sorry for the late reply, but thankyou so much Socks, that looks great! :)
    That has definitely helped me figure out how to get the effect I need, thank you so much <3

    Good ! :smile:

    If you want the movement to just be horizontal then you can simply switch off the Y constrain behaviour.

Sign In or Register to comment.