Coding problem - I can't get people to hug!

I want my characters (Leora and Una) to walk back to the third character (Eliena) and give her a hug. Here’s my code:

ELIENA (deepbreath)
I should have stopped them.

@LEORA moves to layer 1
@UNA walks to spot 1.073 174 87 in zone 2 and UNA is walk_neutral_rear and LEORA walks to spot 1.118 89 76 in zone 2 and LEORA is walk_neutral_rear and UNA faces right and LEORA faces left
@UNA is hug_neutral_loop_rear and LEORA is hug_neutral_loop_rear and LEORA faces left and UNA faces right and ELIENA is hug_surprised_loop

However, between the second line of code (by which I mean the line beginning with the second @) and the third, the characters face away from each other completely for a moment before completing the third line.

It looks like this:

Anyone know how to fix this?

1 Like

Use “does it while” instead of “is” when you make characters walk while doing an animation. This will get rid of that awkward pause and facing front. This way they go straight into the hugging animation after walking.

2 Likes

It almost works but Leora still looks to the left. I can live with that though, this is far better than anything I’ve tried so far!

Face LEORA right

I know this probably sounds incredibly obvious, but where do I put that in the code? :joy:

to…

@UNA is hug_neutral_loop_rear and LEORA is hug_neutral_loop_rear and LEORA faces right and UNA faces right and ELIENA is hug_surprised_loop

Unfortunately that doesn’t seem to work - Leora is then facing the wrong way in the hug. Thanks anyway though!

Which one’s Leora?

The one dressed in red

Oh hmm, she should be facing left then. Can you show me what it looks like when you’ve got “faces left” for Leora?

This is where the problem is now (between lines 2&3):

And this is where it finishes:

(BTW, even if we can’t fix it, thank you so much for taking the time to give me a hand :blush:)

Try this instead:

&UNA walks to spot 1.073 174 87 in zone 2 and UNA does it while walk_neutral_rear and UNA faces right then UNA is hug_neutral_loop_rear and UNA faces right and ELIANA is hug_surprised_loop
@LEORA walks to spot 1.118 89 76 in zone 2 and LEORA does it while walk_neutral_rear and LEORA faces left then LEORA is hug_neutral_loop_rear and LEORA faces left

Yep, exactly as Dara said. I thought you meant afterwards aha.

Thank you so much!

It worked! Thank you, you must be some kind of coding miracle worker!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.