Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Bodenhorst on Sat 01/06/2024 23:14:53

Title: Customized Character [SOLVED]
Post by: Bodenhorst on Sat 01/06/2024 23:14:53
Hey there,

I want to make a costumizable Character by putting 3 parts together. Each Bodypart is a different Character,
the feet, the body and the head.
So I can choose a different T-shirt, pants and hairstyle for example.
I want to put those layers onto each other with the FOLLOW CHARACTER-function and the FOLLOW_EXACTLY-parameter.
The problem is, that the following Characters ignore the turnaround-animation and the walking-animation
as well as the direction.

Is there a way for a exactly_following Character to mimic all the animations of the character he follows?

I hope my description is understandable,
thanks for your help.
Title: Re: Customized Character
Post by: Khris on Sun 02/06/2024 11:17:37
I was surprised this doesn't work as expected but apparently AGS only duplicates the position.
You can do this manually by adding lines like this in repeatedly_execute_always:

  cShirt.Loop = player.Loop;
  cShirt.Frame = player.Frame;

This obviously requires the following character to have a shirt version duplicate of the walk-cycle frames, but that's pretty much a given anyway I guess.
Title: Re: Customized Character
Post by: Bodenhorst on Mon 03/06/2024 21:46:13
Thank you Khris for that quick reply.
It actually works that way  :)

The only thing is that about every third frame there is a small disconnection between the bodyparts.
Could it be because the system is too slow to simultaniously show the frames?
I have to check whether there is a graphic mistake in the sprites,
but they should fit pixelperfect together.

Give me some time to ensure what the problem is and I will be back.

Anyway thankful for that instant help.

Greetings from Cologne to Munich ;)
Title: Re: Customized Character
Post by: Crimson Wizard on Mon 03/06/2024 21:57:01
Perhaps try using "late_repeatedly_execute_always" function instead.
https://adventuregamestudio.github.io/ags-manual/RepExec.html
Title: Re: Customized Character
Post by: Bodenhorst on Tue 04/06/2024 21:37:55
Thank you Crimson Wizard, the  "late_repeatedly_execute_always" function made it work perfect :-D

I am so happy, this is the first time for me posting something in this forum.
This is a great and helpful community here.

How do I mark this topic as solved?

I appreciate so much that there are people spending their time helping out newbies like me ;)
Title: Re: Customized Character
Post by: Snarky on Tue 04/06/2024 22:22:41
Quote from: Bodenhorst on Tue 04/06/2024 21:37:55How do I mark this topic as solved?

If you edit the first post in the thread, you can change the subject. It's customary to add "[SOLVED]" to mark it solved.