Page 1 of 2
walking man
Posted: Mon Sep 08, 2014 8:59 pm
by AstghikM
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

Re: walking man
Posted: Tue Sep 09, 2014 11:55 am
by Klaus
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
Re: walking man
Posted: Tue Sep 09, 2014 12:50 pm
by AstghikM
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

Re: walking man
Posted: Tue Sep 09, 2014 2:45 pm
by Klaus
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
Re: walking man
Posted: Tue Sep 09, 2014 3:42 pm
by AstghikM
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.

Re: walking man
Posted: Tue Sep 09, 2014 3:53 pm
by Klaus
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
Re: walking man
Posted: Tue Sep 09, 2014 3:59 pm
by AstghikM
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

Re: walking man
Posted: Tue Sep 09, 2014 4:28 pm
by Klaus
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.
Re: walking man
Posted: Tue Sep 09, 2014 4:34 pm
by AstghikM
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

Re: walking man
Posted: Tue Sep 09, 2014 4:46 pm
by Klaus
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.
Re: walking man
Posted: Tue Sep 09, 2014 4:53 pm
by AstghikM
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
Re: walking man
Posted: Tue Sep 09, 2014 5:13 pm
by Klaus
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?
Re: walking man
Posted: Tue Sep 09, 2014 6:28 pm
by Klaus
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!
Re: walking man
Posted: Tue Sep 09, 2014 6:33 pm
by endernafi
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
Re: walking man
Posted: Tue Sep 09, 2014 6:40 pm
by Klaus
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!?