Animating A Character While Your Moving

Started by Game Creator, Sun 18/12/2011 07:16:05

Previous topic - Next topic

Game Creator

Hi

i have been using the program for a while now and i have a slight problem.
i am not sure if it's on the forum's so sorry.
i have a character walking into a room and another character already standing there. i have the animation
of him smoking already worked out but i cannot move my character while the animation play's.
could i please get an simple solution to what's probably a simple question.

thank you.

steptoe

#1
Hi

For the animating smoking character use eNoBlock so it runs in the background with eRepeat if you want it to run all the time until you stop that animation else the animation repeats all the time.

Using eBlock stops anything else happening until its finished and if you have it as eRepeat then it will run forever and nothing else will happen.

Check out the manual for full details:

Animate (character):

Character.Animate(int loop, int delay, optional RepeatStyle,optional BlockingStyle, optional Direction)

Animate (object):

Object.Animate(int loop, int delay, optional RepeatStyle,optional BlockingStyle, optional Direction)



Game Creator

Hi

Thank's, I Will go read the manual again.
i hope the eRepeat Will Work because i've tried everything else i can think of.
thank you. if i have any problem's i'll let you know.

thank's again.

steptoe


Mouth for war

#4
Maybe you could make a new view for the character? So the new walkview would be him walking and smoking at the same time?

EDIT: AHHH Totally misread what you wanted to achieve :D
mass genocide is the most exhausting activity one can engage in, next to soccer

Game Creator

#5
Hi

Again I'll Say Thank's For The Tips But I Tried Everything And I Re-Read The Manual, however Feel I Did Not Explain As Good As I Could Have.
So here It Goes Again.
When My Character Walk's Into The Room, I Want The Character To Be Smoking. I Can Get Him To Do The Smoking Action But The Cursor Changes To A Small Clock And My Character Won't Move. What I Would Like Is For My Character To Be Able To Move Around While The Other Is Doing This.

Any Tip Would Be Appreciated.

Thanks

Also I Tried eRepeat, eNoBlock, EBlock And Not A Lot Of Help.

monkey0506

Could You Post Some Code Please? Oh And Also It's Not Really Necessary To Capitalize Every First Letter Of Every Word In Your Sentences.

Khris

Using eNoBlock in the correct way should fix this trivial issue.

What you describe is clearly a blocking animation.

Game Creator

Hi

here is the code.

cAlf.Animate(0, 7, 7, eNoBlock);
i would like him to do this continuesly

i might be missing something but i'm not sure. i only want for him to be smoking and i can still move my character.
sort of like in secret's of monkey island when the pirates are drinking, your still able to walk around.

again thank's

sorry about capital's it's a habit.

monkey0506

I'm not sure where you came up with those parameters, but you might need to read the manual instead of just guessing what the parameters should be.

Character.Animate(int loop, int delay, optional RepeatStyle, optional BlockingStyle, optional Direction)

What you're looking for now is the RepeatStyle parameter which should be eOnce (0) or eRepeat (1). Any other values may not work properly (I haven't actually looked at how the engine implements it, but you shouldn't just toss random values into parameters that expect specific ones).

Oh, and I might have been a bit rude the way I addressed your capitalization technique before, but I didn't mean that you should never use any capital letters at all...but I don't know why capitalizing every (first letter of every) word would ever have become a habit.

Game Creator

#10
Hi
i've edited my post, now i've finally got my guy to smoke while the main character walk's around. now i'm not sure but her come something straight from the X-files. i got annoyed that it wasn't working so i removed the chunk that says for to animate, from the script. yet, when i tested the game out just now, he was smoking. i'll admit, not as fast as i would like but he is. if you know why tell me please. otherwise, leave it at that.
as for the capitalising, i think because the shift key is usualy the button for running in the GTA games i can't help it.

Thank's again for all your help.



monkey0506

Quote from: Game Creator on Mon 19/12/2011 00:05:52i've edited my post, now i've finally got my guy to smoke while the main character walk's around.

Which post was edited? I don't see that anything was changed...good that you got it working though...

Quote from: Game Creator on Mon 19/12/2011 00:05:52now i'm not sure but her come something straight from the X-files. i got annoyed that it wasn't working so i removed the chunk that says for to animate, from the script. yet, when i tested the game out just now, he was smoking. i'll admit, not as fast as i would like but he is. if you know why tell me please. otherwise, leave it at that.

Um, no. Characters don't just randomly animate in the background. There is a script somewhere that is handling the animation.

Quote from: Game Creator on Mon 19/12/2011 00:05:52as for the capitalising, i think because the shift key is usualy the button for running in the GTA games i can't help it.

So you have no idea about the (grammatical) rules of capitalization because Grand Theft Auto games make use of the shift key? ...yeah, that makes sense.

Quote from: Game Creator on Mon 19/12/2011 00:05:52Thank's again for all your help.

You're welcome.

steptoe

You can change the characters animation delay overall in the characters events pane and adjust animation delay or do it in the animate character code when you need a different delay (slower or faster). You can speed it up or slow it down by using a delay number, normally between 0 - 6 but could be higher for really slow animation. 0 being the fastest with no delay etc

Check this out from the manual:

Character.Animate(int loop, int delay, optional RepeatStyle,optional BlockingStyle, optional Direction)

This should help you with the speed of the animation.


Game Creator

thank you for all your help, you've been very helpful.

also i will go through the scripts to see if i can find it. then i will speed it up because it about a minute in between animation.

thanks.

SMF spam blocked by CleanTalk