Page 1 of 1

ANIMPOS

PostPosted: Sun Mar 06, 2005 12:13 am
by willg101
How do you make animpos apply to all animations instantly?
It doesn't work like that in my game.

PostPosted: Sun Mar 06, 2005 2:12 am
by makslane
animpos will change the frame of your current animation only

PostPosted: Sun Mar 06, 2005 6:33 am
by jazz_e_bob
get animpos
change animation
put animpos?

( theory not tested ) :wink:

PostPosted: Tue Mar 08, 2005 1:36 am
by willg101
jazz_e_bob wrote:get animpos
change animation
put animpos?

( theory not tested ) :wink:

Ummm.. Please explain...

PostPosted: Tue Mar 08, 2005 3:32 am
by jazz_e_bob
OK - I tried to make a demo.

http://www.artsystems.com.au/game%20editor/demo%20-%20animpos%20sync.zip

An actor with two animations.

ON Mouse Down Event:
Code: Select all
double oldAnimPos = animpos;

if ( animindex == getAnimIndex("katie 01") )
  ChangeAnimation("Event Actor", "lily 01", FORWARD);
else
  ChangeAnimation("Event Actor", "katie 01", FORWARD);

animpos = oldAnimPos;


But...

It doesn't seem to work. :(

The animation position resets to the first frame. Not to the same frame as the previous animation.

Makslane may know what I am doing wrong. He is good at this kind of thing. :wink:

PostPosted: Sat Mar 12, 2005 4:59 pm
by willg101
Thanks for trying! :D

I dont any more help, though. I don't need this code for now...

PostPosted: Sat May 21, 2005 5:55 pm
by tom.drin
Hi!
I'm interested in this question, because I've got same problem...when I'm changing the gun, my player resets animation and it looks bad.
I was thinking about similar code like jazz_e_bob showed, but like he I find out that it's not working.
Do you have any ideas how to take care of this?

PostPosted: Fri May 27, 2005 10:30 pm
by willg101
No, I just plain gave up on this. I needed the code for another site, but by then I found they didn't want my game anymore. :(

Sorry!

PostPosted: Sat May 28, 2005 6:25 am
by ingsan

PostPosted: Tue May 31, 2005 12:17 pm
by makslane
To change animation without reset current frame, just use the "No change" option in Change Animation action (NO_CHANGE in script)

Sorry all, I have put this option a long time ago, but forget update the docs :oops:

PostPosted: Tue May 31, 2005 12:52 pm
by jazz_e_bob
Thanks mate.

I have updated the demo:

http://www.artsystems.com.au/game%20editor/demo%20-%20animpos%20sync.zip

Click on girl to change the anim. The animations stay synchronised!

Image