How can I make a continuous moving animation?

Started by , Sat 24/04/2004 22:24:52

Previous topic - Next topic

G

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

Scummbuddy

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?
- Oh great, I'm stuck in colonial times, tentacles are taking over the world, and now the toilets backing up.
- No, I mean it's really STUCK. Like adventure-game stuck.
-Hoagie from DOTT

Ashen

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.

G

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

G

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.

Bryan

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().
this space intentionally left blank

Ashen

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.

G

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.

Ashen

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.

G

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.

Ashen

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.

G

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"

SMF spam blocked by CleanTalk