Oh, joy. Hotspot animation + leaving room 'glitch'

Started by Flippy_D, Thu 26/06/2003 22:42:34

Previous topic - Next topic

Flippy_D

Right, the problem I have is as the player leaves the first room, an animation is shown of the character going through a hatch, then the hatch closing behind them, then the room changes to room2, as one would expect. However, after getting that done (with alot of help from the lovely folk at #ags on IRC), there remains a problem.
Just before the animation plays, the character sprite jerks suddenly upwards in a straight vertical line for less than a second, and then everything goes ahead normally. I shall post my script here:

Quote// script for hotspot2: Player stands on hotspot
DisableHotspot(2);

MoveCharacterBlocking(EGO, 205, 73, 1);
ObjectOn(0);
SetObjectView(0, 5);
AnimateObject (0, 0, 5, 0);
SetCharacterView(EGO, 6);
AnimateCharacter(EGO, 0, 3, 0);

while (IsObjectAnimating(0)==1){Wait(1);}
NewRoomEx(2, 95, 125);
ReleaseCharacterView(EGO);

Incidentally, all my sprites are fine. Neither BOYD, Annie, or Def could help me with this, even after I sent two of them the game itself. If you think you can help, but would be better off looking directly at the game, I can send it in two zips amounting to just over a megabyte. I have tried changing the last variable on move char blocking to 0, but that didn't seem to do any good.

Any ideas?

MillsJROSS

Have you faced the character where the charcter needs facing? Or does it do that after walking there?

-MillsJROSS

Pumaman

What sprite is displayed while he is jerked upwards? Is it his normal standing view, or the first frame of the animation?

Spyros

It may be a sprite of the view 6.
It usually happens when animating objects.
Before the character animation put a
character[EGO].loop=0;
character[EGO].frame=0;
and see if it helps

Timosity

That's an interesting point Flippy, I have the same problem with an animation sequence where, my character animates, and just before he starts walking to the next point, he quickly faces UP, when already facing right, then walking right.

Also when I release character view in many of my animations, he always faces a different direction, (doesn't matter which way he was facing to begin with)

I just put up with these things and put it down to either my lack of knowledge, or lack of explanations, or expectations of others without considering others thought processes, it just happens in life, (it's also not view 6)

I've tried face location with no luck, but it's no major problem, it just looks like a glitch in my game, but also looks less professional, (which I like) It would just be nice to know why it happens

Pumaman

Strange, this shouldn't happen... if you're getting it too then it really needs investigation.

Timosity, your problem is probably due to the fact that ReleaseCharacterView doesn't change the loop number back, so he will go to facing in whichever direction the loop that was playing in the animation was.

Unfortunately I can't really change this behaviour now because there may be people relying on it working this way.

Flippy_D

Quote
Have you faced the character where the charcter needs facing? Or does it do that after walking there?

What sprite is displayed while he is jerked upwards? Is it his normal standing view, or the first frame of the animation?

Well, it's already facing up and the animation starts with a facing up frame, so I'm not entirely sure to be honest, it could be either.

Spyros, I'll give that a shot - but I can't right now. I'll let you know the result. I don't quite know what you mean about a sprite 'of the view 6'. Is 6 the upwards facing view? if so, I've mentioned I'm not sure if it's the starting frame of the animation or the sprite itself.

Flippy_D

#7
Spyros, I tried this, is this what you meant?:

Quote
 // script for hotspot2: Player stands on hotspot
DisableHotspot(2);

MoveCharacterBlocking(EGO, 205, 73, 1);
ObjectOn(0);
SetObjectView(0, 5);
character[EGO].loop=0;
character[EGO].frame=0;

AnimateObject (0, 0, 5, 0);
SetCharacterView(EGO, 6);
AnimateCharacter(EGO, 0, 3, 0);

while (IsObjectAnimating(0)==1){Wait(1);}
NewRoomEx(2, 95, 125);
ReleaseCharacterView(EGO);

It didn't make any difference, sadly  :-\


Edit: Oh, shoot, sorry about the double post

SMF spam blocked by CleanTalk