Hi everyone,
I'm trying to make a top down game where the user moves the character by tapping the screen and the character moves to that locations... I've attached a copy to better show the issue i'm experiencing...
I have it set for the character to start in a specific location depending on if it is moving from room 1 to room 2 or vice versa...
When the character transitions from room 1 to room 2 the character will start from the position i've determined as the starting location, but then proceeds to move to the last clicked location from the other card...
To make it a bit more confusing... it doesn't always do this, and seems to work perfect for a short while... then it seems to revert back to the previous cycle of continuing to move like before...
Any advice or resources that you can provide would be greatly appreciated... I'm pretty stumped on this one...
thank you in advance for any insight you can provide!
-Sean
moving object continues to move after "go to card"
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 3901
- Joined: Sat Mar 24, 2007 2:54 am
- Location: Palo Alto
Re: moving object continues to move after "go to card"
Hi Sean,
Man I'm getting old... this took way too long to solve.
The trick here is that if liveCode gets a second move command while doing a move command it stops the old one and starts the new one. You can get rid of set loc.
Simon
Man I'm getting old... this took way too long to solve.
Code: Select all
... send "moveHero" to me in 20 millisec
end openCard
on moveHero
move group "hero" to 821,266
end moveHero
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: moving object continues to move after "go to card"
Hi Simon,
Thank you for your help on this! I'll give a shot when as soon as i get a chance, and report back!
Thanks again!
-Sean
Thank you for your help on this! I'll give a shot when as soon as i get a chance, and report back!
Thanks again!
-Sean
Re: moving object continues to move after "go to card"
It took me longer to get back than i'd anticipated, but it looks like that seems to have solved the issue.
Thank you again for your help!
-Sean
Thank you again for your help!
-Sean