I want my ball to bounce of a wall, which it does, but it slows down each time it hits a wall. How do i keep it going at a constant or accelerating speed?
WOW we have the same names... lol. I should have made my GS account sooner. I had been around the forums a bunch and developing but never made an account. wow. haha. Nice to meet you tacostand.. and to everyone. WE ARE DIFFERENT PEOPLE lol.
Sometimes we have the answers and sometimes we are just caught up reading pages of posts to see if we have answers. I have many questions that have never been answered and probably never will because of whatever reason.
Chaser said: Sometimes we have the answers and sometimes we are just caught up reading pages of posts to see if we have answers. I have many questions that have never been answered and probably never will because of whatever reason.
Hi, the previous question was not fully answered in the forum. It is actually quite tricky to get a ball to accelerate controllably after hitting a wall. If you use Accelerate it will not work as expected and Change Velocity also has a few problems too.
This is what I did to get the actor to bounce off of a wall and continue to accelerate. Thanks to TshirtBooth who got me almost the whole way there...
Make a ball actor with the following timer
Timer: Every 0.1 seconds Change Attribute self.PuckSpeed to self.ballspeed + 10 <--change number to speed you'd like
Rule: When Ball hits Wall Change attribute: Ball.Direction = 1
Rule: When Ball.Direction=1 Constrain: self.Linear velocity. X to -self.Ballspeed
You can check it by putting a Display Text with self.Linear velocity. X in the text field
My ball did not change Y direction, you'll need to adjust the above to make it also work for Y direction.
just wanted to remind everyone of a few rules here. in addition, try checking out the pong template in the GS application, it may have some good rules.
1. SEARCH FIRST. It may not work as well as we’d like it to, but our Search does still turn up relevant items more often than not. So, to avoid posting about the same thing time and time again, just do a quick search before posting.
2. REDUCE REDUNDANT THREADS. With new posts of repeatedly answered questions, wish lists and feature requests, and having one post of your game, then another post of an update of your game, I think we all can appreciate less threads to trudge through. Especially when most people stare at the "Latest Discussions" section and the threads are just shifting down like crazy, especially when people don't...
3. USE DESCRIPTIVE TOPICS. You do have a whole line (it even word wraps!) to put something eye-catching and descriptive, so please refrain from naming your topic something completely useless like "Question..." and "Help, please!!!" Also, if your topic is something that's directed toward someone, write them on their wall, or go to their email or website and contact them through there. But, if you want others to chime in also, leave out their name on the topic and place it in the body of the topic instead. With these practices, the board doesn't end up look like a crazy IM chat history, but a bunch of informative, useful topics, full of discussion, hints, tips, and input from everyone in the community.
Comments
be patient!!!!!!!
you are not getting help because of this
and to everyone.
WE ARE DIFFERENT PEOPLE lol.
TacoStand
This is what I did to get the actor to bounce off of a wall and continue to accelerate. Thanks to TshirtBooth who got me almost the whole way there...
Make a ball actor with the following timer
Timer: Every 0.1 seconds
Change Attribute self.PuckSpeed to self.ballspeed + 10 <--change number to speed you'd like
Rule: When Ball hits Wall
Change attribute: Ball.Direction = 1
Rule: When Ball.Direction=1
Constrain: self.Linear velocity. X to -self.Ballspeed
You can check it by putting a Display Text with self.Linear velocity. X in the text field
My ball did not change Y direction, you'll need to adjust the above to make it also work for Y direction.
__________________
Coming Soon!: Sweepr
1. SEARCH FIRST. It may not work as well as we’d like it to, but our Search does still turn up relevant items more often than not. So, to avoid posting about the same thing time and time again, just do a quick search before posting.
2. REDUCE REDUNDANT THREADS. With new posts of repeatedly answered questions, wish lists and feature requests, and having one post of your game, then another post of an update of your game, I think we all can appreciate less threads to trudge through. Especially when most people stare at the "Latest Discussions" section and the threads are just shifting down like crazy, especially when people don't...
3. USE DESCRIPTIVE TOPICS. You do have a whole line (it even word wraps!) to put something eye-catching and descriptive, so please refrain from naming your topic something completely useless like "Question..." and "Help, please!!!" Also, if your topic is something that's directed toward someone, write them on their wall, or go to their email or website and contact them through there. But, if you want others to chime in also, leave out their name on the topic and place it in the body of the topic instead. With these practices, the board doesn't end up look like a crazy IM chat history, but a bunch of informative, useful topics, full of discussion, hints, tips, and input from everyone in the community.
http://gamesalad.com/game/1804
It is difficult to pull off actually, and requires a bit of math. Feel free to dig into it and use it for whatever you want!
Joe