How can I give my character a Min Speed?
JamesNoble
Member Posts: 19
When one of my actors collides with another actor that is moveable it changes speed, which I don't want. I was able to give it a Max Speed in the Actor Editor under Attributes > Motion > Max Speed > Apply Max Speed (checked), which is good, but now all I need to do is give it a minimum speed. Is there any way I can do that?
I've been struggling with this for a while, and this is the second time I've made a post on the GS forums, but I can't figure out what to do... help!
Thanks!
I've been struggling with this for a while, and this is the second time I've made a post on the GS forums, but I can't figure out what to do... help!
Thanks!
Comments
if self.att motion X<200
change att. self.motion to 300
if self.att motion Y<200
change att. self.motion to 300
For this you could:
constaint attribute `self.motion.X` to `max(300,self.motion.X)`
Obviously it can be done with the Y motion as well. Remember that self.motion.X/Y are vectors so if you want it to be travelling "down" the screen you need to change it to -300.