lots of images and animations...best way to handle them...?

johnjanowskibsc

  • Posts: 127
Hi,

So the football game I am making will have over 10 teams which have 10 different kits. Each kit will have 4 different animations for idle, run right, run left and kick r and kick l. I can cut this down by some teams having the same colour kits.
What would be the best way to check the name of the team against the colour of kit? Then in the game simulator I have written 5 different scenarios that the player has to face.
What would then be the best way to implement a check against a team name, look up the kit colour then use that actor as the main actor for the scene? I can write if statements for this but it seems to long! Would image instances or creating an actor as an attribute be a better solution? I thought I would seek advice before I lead myself down a blind alley!

Thanks in advance for any help

Luyren

  • *
  • Posts: 2642
If the only thing changing is color, use my color swap behavior: https://luyren.itch.io/luyrens-miscellaneous-stencyl-behaviors

By configuring individual color swap sets, you can quickly switch between them based on which team is facing which, and only using one set of animations. There is a video tutorial, documentation file and the description of the attributes for instructions.

One way to use would be naming a color set after a team, and swap colors using the team name.

« Last Edit: February 23, 2021, 09:19:21 am by Luyren »
My Stencyl resources are available here: https://luyren.itch.io/
Cutscenes, RPG Elements, Particles, Map System and many more.
Twitter

johnjanowskibsc

  • Posts: 127
Whoa - what about the face, legs and hands? Will it turn the whole character blue? Sounds intriguing...

Luyren

  • *
  • Posts: 2642
You swap existing colors with whatever you want. So long as you are careful with the order in which you do it, as the video tutorial explains (it's the one in the itch.io page), you'll get only the color changes you want.
My Stencyl resources are available here: https://luyren.itch.io/
Cutscenes, RPG Elements, Particles, Map System and many more.
Twitter

johnjanowskibsc

  • Posts: 127
This sounds exactly what I am looking for  - after finishing my 9 to 5 I will get onto this! Thanks.

johnjanowskibsc

  • Posts: 127
Hi,
Thanks so much. I can't believe that this works! Amazing!!!!