Move to does not stop?
xacto
Member Posts: 146
I currently have my actor (play button) move into place from the right of the screen. It is suppose to stop when it hits 425. It works EVERY TIME with in the GS Application, however on the web and the iphone it will sometime flys by off the screen to the left - never stopping where it should.
Here is the code:
After 3.7 seconds
Move To postions x 425; y 42, Relative to scene, speed 600
Seem very simple. Again, it works sometimes and others not so much.
I even tied the following:
After 3.7 seconds
Rule: if attribute self.postions.x >=425 then
Move To postions x 425; y 42, Relative to scene, speed 600
Any ideas why my actor would fail to move to the write spot and stop?
Xacto
----------------------------------------
StarFire
http://gamesalad.com/game/play/8901
Here is the code:
After 3.7 seconds
Move To postions x 425; y 42, Relative to scene, speed 600
Seem very simple. Again, it works sometimes and others not so much.
I even tied the following:
After 3.7 seconds
Rule: if attribute self.postions.x >=425 then
Move To postions x 425; y 42, Relative to scene, speed 600
Any ideas why my actor would fail to move to the write spot and stop?
Xacto
----------------------------------------
StarFire
http://gamesalad.com/game/play/8901
Comments
Com'on, Quantum knows.....
Sometimes I just get bugs like this with no way that I know of to fix them!
e.g. - an enemy gets hit, an explosion happens... and the enemy's still there instead of being destroyed!
It happens so infrequently that I didn't think of mentioning it. I can see though that this would be a bigger problem at your end!
Sorry I can't help on this one, dude!
Cheers,
QS
Edit - Additionally, I had a very simple collision detector that crashed the entire game. All it did, literally, was detect if you'd hit a tree.
Codemonkey knows about that one though, as it's pretty vital to the game
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
Not sure about the Move To xacto. Its a hard one to pinpoint the reason why it does what it does since its not consistent.
The main issue is; I have four buttons and when I run the game on the iphone, I usually will be able to select only one. All the others fly by.
Xacto
----------------------------------------
StarFire
http://gamesalad.com/game/play/8901
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
All conditions must be true:
space bar down
main actor overlapping with actors of tag "floor"
accelerate (90 degrees ....)
On some platforms with the "floor tag" it will jump on others my main actor will just stand there. These are exactly the same floor actors and everything. Totally inconsistent - can't figure it out.
My brief foray into a platformer of sorts had my character jumping up and being able to jump again mid-jump. It's very weird and that idea's been put on the back-burner for now!
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
Codemonkey - Help!
I'm trying to figure out a way to work around the bug, and as long as I don't allow the actor to jump or walk while on moving platforms (i.e. elevators) where the platforms get close enough for the actor to contact more than one platform at a time, then I can get it to work correctly.
For example. If your actor moves at 45 degrees his position is going to be at some point x.5 and y.5. This can cause the actor to overshoots it's target and then the MoveTo code just runs forever.
I have an example in my profile of how to do always reliable MoveTo behavior using distance, velocity, and time.
The demo is called Shoot XY (or something like that)