360 degree rotating actor

Game Editor comments and discussion.

360 degree rotating actor

Postby d-soldier » Thu Apr 26, 2007 2:35 am

... I've changed some actor animations from a 24 frame animation to 36 (for 360 degree rotating objects) but it seems now that though the objects do rotate to face the desired target, the flicker back and forth between two frames... I've tried: (draw actor)

animpos = nframes*direction(x,y, player.x, player.y)/360.0;

&

angle=direction(x,y,player.x,player.y);
animpos=angle/360*nframes;

So whats the deal!?! My frames (filenames) range from XXXX_01.png - XXXX_36.png
I thought that frame 36 is actually the same as 1, so I tried deleting it and using 35 frames (just in case) but nothing seemed to change... Anyone?
User avatar
d-soldier
 
Posts: 703
Joined: Sun Apr 08, 2007 2:13 am
Score: 61 Give a positive score

Postby Troodon » Thu Apr 26, 2007 3:26 pm

If your first frame would be XXXX_00.png you would need 35. But if it's XXXX_01.png you need 36 frames.
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Postby d-soldier » Thu Apr 26, 2007 4:38 pm

tekdino wrote:If your first frame would be XXXX_00.png you would need 35. But if it's XXXX_01.png you need 36 frames.


I tried both to be sure, the animation still cant seem to stay on a single frame (even when not moving) it flickers between two frames. Since I am coming from a 25 frame roation (to 36) there must be something in the code thats wrong. Anyone>?
User avatar
d-soldier
 
Posts: 703
Joined: Sun Apr 08, 2007 2:13 am
Score: 61 Give a positive score

Postby Troodon » Fri Apr 27, 2007 4:49 am

I had that problem!
It comes only when you don't move isn't it?
Try the code
xvelocity = 0;
yvelocity = 0;
when the actor isn't moving.
I hope that helps. :)
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

funny thing...

Postby d-soldier » Fri Apr 27, 2007 3:34 pm

The solve for this problem is IN THE FILE NAMES!.. Is that a bug then? The file names were:

BossGun2_360_0001.png (and so on through 36)

and things work now that I changed them to:

BossGun_0001.png (and so on through 36)...

Very strange behavior... And why does this topic always say "no posts" when I click on it!?!
User avatar
d-soldier
 
Posts: 703
Joined: Sun Apr 08, 2007 2:13 am
Score: 61 Give a positive score

Postby Sgt. Sparky » Fri Apr 27, 2007 6:19 pm

xD
I think it is a glitch! xD
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron