Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: on Sat 24/04/2004 22:24:52

Title: How can I make a continuous moving animation?
Post by: on Sat 24/04/2004 22:24:52
Hy there
I'm a Spanish AGSer know as G.

While making my first adventure, I've found a problem.
In one of the rooms, I have 3 characters playing with a ball. Each character is independent (They must be independent for the correct development of the storyboard I made).
Now here is the problem: I need to make the ball moving from one character to another continuously, and that isn't a cutscene. I can't find the way to solve this problem, and I can't find the solution at the help files.

Shall I use the ball like an objetct?
Shall I use it like a character?
Can anyone help me, please?

Congratulations Chris for the new PHP style web, that's great!

Sorry for the misprints
Title: Re:How can I make a continuous moving animation?
Post by: Scummbuddy on Sat 24/04/2004 23:03:57
Will you be able to talk to anyone of them at a time? Would this call for the other two to continue to play with the ball just between themselves while you and the other person talk?
Title: Re:How can I make a continuous moving animation?
Post by: on Sat 24/04/2004 23:10:13
I think making the ball a character, and using the MoveCharacterPath command is the easiest way to do this. E.g.:

if (character[BALL].walking == 0) {
 MoveCharacter (BALL, 180, 160);
 MoveCharacterPath (BALL, 220, 140);
 MoveCharacterPath (BALL, 140, 150);
}

in the 'Repeatedly Execute' room script will move the character BALL in a constant loop between 3 points. If you need to leave a character out of the loop for a while, like Scummbuddy said, the coding gets a lot more complex, but it's still possible.
Title: Re:How can I make a continuous moving animation?
Post by: on Sat 24/04/2004 23:11:18
When you talk to them, they stay playing with the ball between them.
If it serves to you, the main characgter must 'eliminate' these 3 'ball-players' one after another
Title: Re:How can I make a continuous moving animation?
Post by: on Sat 24/04/2004 23:42:12
The way Ashen said is good when the 3 caharacters are playing, but starts giving problems when one of them is 'eliminated' by the main character. Thank you very much anyway Ashen.

Please, if someone knows some way to help me with this problem, I'd thank him or her.
Title: Re:How can I make a continuous moving animation?
Post by: Bryan on Sat 24/04/2004 23:53:02
To let the ball-players be 'eliminated' in any order by the gamer you could set up a simple "state machine" with a series of if ... else if ... statements.

For example with only three players there is a finite number of states, either
all three or one of the pairs AB, AC, BC.

Define each of these animations, then use some simple scripting logic to figure out who is "in the game" during repeatedly_execute().
Title: Re:How can I make a continuous moving animation?
Post by: on Sat 24/04/2004 23:58:34
Actually, I've just been working on a test game with the if ... else if ... else if stuff in it. It seemed easier to do it, see if it worked, then give you the test game, than to just post the scripting. It's a little buggy, and the graphics aren't up to much, but you're welcome to it if it'll help.
Title: Re:How can I make a continuous moving animation?
Post by: on Sat 24/04/2004 23:59:35
Thanks Bryan, it can be a way to solve my problem. I' try it too.

I still accept other solutions from anyone who can help me.
Title: Re:How can I make a continuous moving animation?
Post by: on Sun 25/04/2004 00:07:32
G, try this:

http://www.geocities.com/whoismonkey/balltest.zip

I haven't bothered with a talking interaction, and you just have to USE the other character to eliminate them. It's very, very basic, but hopefully it'll help.
Title: Re:How can I make a continuous moving animation?
Post by: on Sun 25/04/2004 00:18:15
Thank you Ashen, but the link looks to be broken. I can't download it. If you know some mirror to that zip file, please let me know.

Thanks anyway.
Title: Re:How can I make a continuous moving animation?
Post by: on Sun 25/04/2004 00:25:31
Weird. If you just click it, it says 'Page not available', but right-click and 'Save Target As...' should be working fine. Otherwise, it's only 65kb, I could probably e-mail you it if needed.
Title: Re:How can I make a continuous moving animation?
Post by: on Sun 25/04/2004 00:30:20
I've got it. Thank you very much Ashen, there's no need to send it now.

Due to I'm learning I still accept other solutions.
"Every known knowledge isn't enough"