Pausing objects when ever on path



  • Hi!

    I’ve recently bought the SWS and I’ve tried to make this myself but don’t know how to go about it.

    What I want to do is to gain more control over the game objects. I want for example to pause the objects movement when they are hit by a projectile. I also want the objects to randomly change direction and randomly pause movement and also if possible to change movement speed randomly.

    Thank you so much in advance.



  • Hello,

    have you tried calling methods from our scripting reference?

    https://www.rebound-games.com/docs/sws/splineMove.html

    While detecting the initial spot for calling these methods is up to you (e.g. on collision), the scripting documentation should provide everything you need.

    "pause the objects movement", "randomly pause movement" > splineMove.Pause
    "change movement speed" > splineMove.ChangeSpeed
    "randomly change direction" > depends on what you mean by this. You could set the random movement type to begin with, which lets the object moves through each waypoint in a random order. For simply changing direction at the current position > splineMove.Reverse



  • Hi @Baroni ! Thank you so much for the fast reply. I didn´t know you guys had such a page until now. It´s seems to be everything I need. Thank you once more.


Log in to reply