Changing direction
How to reverse direction of an actor.My enemies move left and when it hits a wall it should revers direction and start moving to right and so on
Best Answers
-
tenrdrmer Posts: 9,934
Well i'll go ahead an accept an answer for you @SANDEEP410 please learn a bit of etiquette with that reject button. If I remember right you seem to not understand what it really should be used for. Which is completely off and worthless answers. To be honest @tshirtbooths answer at the start should not have been rejected either. it would also work just more complex. -
JohnPapiomitis Posts: 6,256
It was fixed, it just wasnt working because of a entirely different issue and because you didnt know about restitution. Not because his answer was incorrect.
Answers
Is there anyway to reverse direction of enemy
Change self.linearvelocity.x to (-self.linearvelocity.X)
demo: http://www.mediafire.com/?mdzf7lrgpass08h
I know I'm more likely to click on a thread that lists "Question" rather than "Answered" even though I know that without a check mark the answer hasn't been Accepted yet. I think we need a new designation... maybe "Replied" instead of "Answered" and then "Answered" with check mark when the original poster accepts an answer.
@MotherHoose an impressive demo for a simple and useful concept.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User