Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
AstghikM
- Posts: 45
- Joined: Mon Sep 08, 2014 8:35 pm
Post
by AstghikM » Mon Sep 08, 2014 8:59 pm
Hi there

I am new here in this forum

so... i am learning live code and i have a problem with animation, i was thinking maybe you could help me

So the problem is that i can.t move my player to mouseloc() at the same time when it is changing skins. For first it is reading all its skins then moving to mouseloc()

can you help me with that? please

Also here is the file.
p.s. Sorry for maybe bad english

-
Attachments
-
- man.zip
- click start then click to the card to see the result :)
- (5.61 KiB) Downloaded 283 times
-
Klaus
- Posts: 14177
- Joined: Sat Apr 08, 2006 8:41 am
-
Contact:
Post
by Klaus » Tue Sep 09, 2014 11:55 am
Hi AstghikM,
1. welcome to the forum!
2. I moved this to the BEGINNERS section (Hint, Hint!)
3. Will take a look at your stack a bit later when I find the time.
Best
Klaus
-
AstghikM
- Posts: 45
- Joined: Mon Sep 08, 2014 8:35 pm
Post
by AstghikM » Tue Sep 09, 2014 12:50 pm
Klaus wrote:Hi AstghikM,
1. welcome to the forum!
2. I moved this to the BEGINNERS section (Hint, Hint!)
3. Will take a look at your stack a bit later when I find the time.
Best
Klaus
Hi

ohh thank you too much

i'll wait for your answer

-
Klaus
- Posts: 14177
- Joined: Sat Apr 08, 2006 8:41 am
-
Contact:
Post
by Klaus » Tue Sep 09, 2014 2:45 pm
Hi AstghikM,
please do not use THAT much smileys in ONE sentence (or are you 12 years old?), thank you
OK, for a beginner you have a LOT of handlers in your card- and stackscript!?
Most of this is definitively not neccessary for your actual small problem and may even be the source of your problem.
Do you understand what is going on in the scripts? I don't!
Please tell me in clear words what you are trying to do, cannot (actually don't want to) guess from the scripts!
Best
Klaus
-
AstghikM
- Posts: 45
- Joined: Mon Sep 08, 2014 8:35 pm
Post
by AstghikM » Tue Sep 09, 2014 3:42 pm
Klaus wrote:Hi AstghikM,
please do not use THAT much smileys in ONE sentence (or are you 12 years old?), thank you
OK, for a beginner you have a LOT of handlers in your card- and stackscript!?
Most of this is definitively not neccessary for your actual small problem and may even be the source of your problem.
Do you understand what is going on in the scripts? I don't!
Please tell me in clear words what you are trying to do, cannot (actually don't want to) guess from the scripts!
Best
Klaus
Sorry , i didn't know you could get angry from TOO much smiles

I'm just smile girl (more than 12 years) .
i am not a beginner in livecode, i said i am new in this forum, it is 3 month i am learning livecode by myself, my problem is with animation. In words i can tell you i want to make just a walking man, i want to click some place and that man walk to there.

-
Klaus
- Posts: 14177
- Joined: Sat Apr 08, 2006 8:41 am
-
Contact:
Post
by Klaus » Tue Sep 09, 2014 3:53 pm
Hi AstghikM,
I am not angry because of your smily overkill, but this is just ridiculous:
Hi

ohh thank you too much

i'll wait for your answer

OK, what about the gazillions other handlers? Do you really need them?
And what is actually YOUR code so far?
Best
Klaus
-
AstghikM
- Posts: 45
- Joined: Mon Sep 08, 2014 8:35 pm
Post
by AstghikM » Tue Sep 09, 2014 3:59 pm
Klaus wrote:Hi AstghikM,
I am not angry because of your smily overkill, but this is just ridiculous:
Hi

ohh thank you too much

i'll wait for your answer

OK, what about the gazillions other handlers? Do you really need them?
And what is actually YOUR code so far?
Best
Klaus
ok, look i just changed my code, now it is clear i guess

Now my charchter is moving but not in clicks it is following my mouse

-
Attachments
-
- walkkingMan2.zip
- (5.21 KiB) Downloaded 291 times
-
Klaus
- Posts: 14177
- Joined: Sat Apr 08, 2006 8:41 am
-
Contact:
Post
by Klaus » Tue Sep 09, 2014 4:28 pm
My questions remains:
OK, what about the gazillions other handlers? Do you really need them?
And what is actually YOUR code so far?
To be honest, this is definitively OVERKILL for simply moving a button and change its IDs!
I will see if I can come up with a simpler (and thus more understandable) solution.
-
AstghikM
- Posts: 45
- Joined: Mon Sep 08, 2014 8:35 pm
Post
by AstghikM » Tue Sep 09, 2014 4:34 pm
Klaus wrote:My questions remains:
OK, what about the gazillions other handlers? Do you really need them?
And what is actually YOUR code so far?
To be honest, this is definitively OVERKILL for simply moving a button and change its IDs!
I will see if I can come up with a simpler (and thus more understandable) solution.
i don't understand your questions

do you think handlers too much??? okay i'll wait for your code and i.ll try to do in simple way too, but i tried that way long time ago and couldn't do it, so please if you can Help me

thanks

-
Klaus
- Posts: 14177
- Joined: Sat Apr 08, 2006 8:41 am
-
Contact:
Post
by Klaus » Tue Sep 09, 2014 4:46 pm
OK, my questions are exactly:
1. Did you write all that code?
2. Do you really understand what is going on in the code and what the handlers do?
And the animation is JERKY with the current code!
What I mean is for moving a button and change its icons these scripts are OVERKILL!
So I will try to come up with something else that is UNjerky and easier to understand.
-
AstghikM
- Posts: 45
- Joined: Mon Sep 08, 2014 8:35 pm
Post
by AstghikM » Tue Sep 09, 2014 4:53 pm
Klaus wrote:OK, my questions are exactly:
1. Did you write all that code?
2. Do you really understand what is going on in the code and what the handlers do?
And the animation is JERKY with the current code!
What I mean is for moving a button and change its icons these scripts are OVERKILL!
So I will try to come up with something else that is UNjerky and easier to understand.
Yes i understand whole code because i wrote it learning from lessons GameAcademy

okay okay i am waiting for your help

thanks
-
Klaus
- Posts: 14177
- Joined: Sat Apr 08, 2006 8:41 am
-
Contact:
Post
by Klaus » Tue Sep 09, 2014 5:13 pm
AstghikM wrote:Yes i understand whole code because i wrote it learning from lessons GameAcademy
Great! I don't!
But the code does not do what you want at all, so why are you including/using it in your stack?
-
Klaus
- Posts: 14177
- Joined: Sat Apr 08, 2006 8:41 am
-
Contact:
Post
by Klaus » Tue Sep 09, 2014 6:28 pm
OK, Madame with the unpronouncable name (AstghikM?), here my stack which does exactly what you want:
Click anywhere on the card and the man moves to that point and anminates in the meantime.
I deleted all previous scripts and started anew, all is in the CARD script with lots of comments!
-
Attachments
-
- walking_man_km.livecode.zip
- (5.62 KiB) Downloaded 305 times
-
endernafi
- VIP Livecode Opensource Backer

- Posts: 296
- Joined: Wed May 02, 2012 12:23 pm
-
Contact:
Post
by endernafi » Tue Sep 09, 2014 6:33 pm
AstghikM wrote: So the problem is that i can.t move my player to mouseloc() at the same time when it is changing skins.
Hi there AstghikM,
Try this one:
It's the same structure as yours and Game Academy's.
Klaus's code works, too, if you think that Game Academy code is overkill for this job.
But if you want animate many other objects, more than one player, then you should proceed with Game Academy way.
Hope it helps...
~ Ender
~... together, we're smarter ...~
__________________________________________
macOS Sierra • LiveCode 7 & xCode 8
-
Klaus
- Posts: 14177
- Joined: Sat Apr 08, 2006 8:41 am
-
Contact:
Post
by Klaus » Tue Sep 09, 2014 6:40 pm
Ah, that bunch of code war from the game academy, that explains much!
But the moving itself is still jerky, Ender, the button moves a bit, then stops and finally kind of jumps to where I clicked!?