animation finish help

Non-platform specific questions.

animation finish help

Postby DollMaster » Mon Sep 17, 2007 3:37 am

For my full code, see this thread http://game-editor.com/forum/viewtopic.php?f=2&t=4392

In each key down event, depending on what direction he is faceing/move state, I have the variable DIR assigned a value.

Code: Select all
if (key[KEY_UP]==0&&key[KEY_LEFT]==0&&key[KEY_RIGHT]==0)
{ChangeAnimation("Event Actor", "run_down", FORWARD);
dir=1;}


The DIR variable is assigned on my key up event too.

Code: Select all
if (key[KEY_UP]==0&&key[KEY_LEFT]==0&&key[KEY_RIGHT]==0)
{ChangeAnimation("Event Actor", "stop_down", FORWARD);
dir=1;}


The DIR variable also determines what animation occurs when the players attacks.
Code: Select all
if(dir==1||dir==5)
{ChangeAnimation("Event Actor", "heroa", FORWARD);}
else if(dir==3||dir==7)
{ChangeAnimation("Event Actor", "heroau", FORWARD);}
else if(dir==2||dir==6)
{ChangeAnimation("Event Actor", "heroal", FORWARD);}
else if(dir==4||dir==8)
{ChangeAnimation("Event Actor", "heroar", FORWARD);}


Code still works like I want except player continuesly does his attack animation.

When these attack animations finish, I want to go back to whatever movement/stand still animation he is supposed to go to depending on the variable DIR.

So I entered this code as an animation finish event, for player attack down animation.
Code: Select all
if(dir==1)
{ChangeAnimation("Event Actor", "stop_down", FORWARD);}
if(dir==3)
{ChangeAnimation("Event Actor", "stop_up", FORWARD);}
else if(dir==2)
{ChangeAnimation("Event Actor", "stop_left", FORWARD);}
else if(dir==4)
{ChangeAnimation("Event Actor", "stop_right", FORWARD);}


else if(dir==5)
{ChangeAnimation("Event Actor", "run_down", FORWARD);}
else if(dir==7)
{ChangeAnimation("Event Actor", "run_up", FORWARD);}
else if(dir==6)
{ChangeAnimation("Event Actor", "run_left", FORWARD);}
else if(dir==8)
{ChangeAnimation("Event Actor", "run_right", FORWARD);}


But he no longer does his attack animation and just stands there. What am I doing wrong? Isn't animation finish supposed to cause something to happen when the animation cycles through all of its frames?
DollMaster
 
Posts: 65
Joined: Fri Jun 16, 2006 2:38 am
Score: 2 Give a positive score

Re: animation finish help

Postby DollMaster » Mon Sep 17, 2007 3:58 am

Ok another question, how many frames must be in an animation in order for the animation finish to work? I have only two frames, in mine and it does NOT work. However, when I increased the # of frames I think it works...
DollMaster
 
Posts: 65
Joined: Fri Jun 16, 2006 2:38 am
Score: 2 Give a positive score

Re: animation finish help

Postby makslane » Mon Sep 17, 2007 12:41 pm

Waht's your Game Editor version? I have tested here and works with 2 frames.
Game Editor is an open source game creator software that's wants to pay it's developers to keep evolving.
If you like Game Editor, make a review!
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Re: animation finish help

Postby DollMaster » Mon Sep 17, 2007 10:18 pm

I have 1.3.4 full version. However, I tested the two frames in on the latest current demo version and it did NOT work.

So my animation's frames looks like this in order for animation finish to work:

filler frame(standing), swing 1, swing 2, filler frame(standing)
4 frames, frame rate=7

This way it works perfectly, however, i worry if there will be a problem if i upgrade to a better version.
DollMaster
 
Posts: 65
Joined: Fri Jun 16, 2006 2:38 am
Score: 2 Give a positive score

Re: animation finish help

Postby makslane » Mon Sep 17, 2007 10:52 pm

Please, post or send me the game.
Game Editor is an open source game creator software that's wants to pay it's developers to keep evolving.
If you like Game Editor, make a review!
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Re: animation finish help

Postby DollMaster » Tue Sep 18, 2007 4:39 am

i sent two zips to support@game-editor.com. one has my working version and one has the recreated animation issue version.
DollMaster
 
Posts: 65
Joined: Fri Jun 16, 2006 2:38 am
Score: 2 Give a positive score

Re: animation finish help

Postby DollMaster » Wed Sep 19, 2007 3:56 am

Any luck Makslane? I kind of prefer to use two frame animations as it'll make it easier on me when I make my weapon actors.
DollMaster
 
Posts: 65
Joined: Fri Jun 16, 2006 2:38 am
Score: 2 Give a positive score

Re: animation finish help

Postby makslane » Wed Sep 19, 2007 12:18 pm

Look your email
Game Editor is an open source game creator software that's wants to pay it's developers to keep evolving.
If you like Game Editor, make a review!
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest