Character.Move speed adjusting

Started by Vince Twelve, Thu 01/01/2009 02:53:22

Previous topic - Next topic

Vince Twelve

I just upgraded a project to the new release to take advantage of the new Character.Move but it didn't work out how I hoped it would.

I'm trying to make two characters move across the screen at the exact same speed but not necessarily in the same direction, but one has to "Move," and one has to "Walk."  But when I do this, the one that is "Moving" zips across the screen way faster than the other even though their speeds are the same.  I believe this has to do with MovementLinkedToAnimation=true on the character that is "Walking."  I tried adjusting the speed down for the "Moving" character, but to make them move at the same speed, the speed needs to be somewhere between -1 and -2 which I can't do.

Before I start ripping out code to change to my work around, is there a way to make the "Move" command move like a "Walk" command?  That is, can a speed=4 "Moving" character move at the same speed as a speed=4 "Walking" character that also has MovementLinkedToAnimation=true?

And before these workarounds are suggested:

-They're moving in different, determined at runtime, directions, so just having one "walk" and then tie the "moving" one's x and y coordinates to the "walking" character won't work.  But it is important that they move at the same speed.

-The "Moving" character must be "Moving" because there are other frames in the view, but the frame and loop shown on the character are changed depending on other factors besides walking animations.  Because of the different way this character is using frames and loops, just creating a view with one frame would mean that I would have to create hundreds of different views, which I'd like to avoid.

-Using LockFrameView stops the character from moving.  I thought that just using LockFrameView and then doing walk would work, but apparently that also locks them in place as far as the "Walk" and "Move" commands are concerned.

My current work around plan:

-I'm planning on changing how the "Moving" object is handled and instead of having one view that has all the appropriate frames and changing between them manually, I'll have one view that has one frame and then change the graphic of that frame in code to the appropriate graphic.   Then I can just have the "Moving" object "Walk" with only one frame in the animation. It's a little more cumbersome, since I'll have to keep track of all the sprite slots, and I'll have to change a lot of code that I've already put in.  So I wanted to post this question first.

Pumaman

Is the "Moving" character also animating at the same time, or not?


Pumaman

It's not possible to syncronize a "Move"ing character with a "Walk"ing one, simply because the "Walk"ing movement speed depends on the animation speed of the character and the animation delay of each of their walking frames -- whereas the "Move"ing character has none of these dependencies.

Vince Twelve

That's what I thought.  Thanks for confirming it for me.

I'm right in thinking that there is no way to do a non-animating "Walk" except to have a one-frame view, correct?

Pumaman

Well, if you had a non-animating Walk then that would just be a Move.

It's the animation that determines the Walk's speed.

Nickydude

Quoteanimation speed of the character and the animation delay of each of their walking frames

How would you change the animation delay?
Best Regards,
Nickydude
www.madladdesigns.co.uk

AGS Beginner's Guide - All you'll ever need!

Pumaman

For the character, just change its "AnimationDelay" property in the editor for that character.

For an individual frame, select the frame in the View Editor and change the Delay property.

Nickydude

Best Regards,
Nickydude
www.madladdesigns.co.uk

AGS Beginner's Guide - All you'll ever need!

SMF spam blocked by CleanTalk