How to minimize events for mutiple charaters

0 favourites
  • 6 posts
From the Asset Store
14 amazing sound files of game events like Level Ups, Level Completes, object spawn, object taking etc.
  • Ok Im not sure if the title is descriptive enough and was having trouble searching in the forum for something similar.

    Basically I have a working character selection for a platformer with three characters, maybe more latter on. I wanted to minimize the number of events for using up memory or space for each charters.

    So i made one general sprite and set of control events for that; plus separate sprites for each charter for simplicity.

    How do i switch those characters objects in and out of the general sprite to work with the control event so i don't have to make the same event for each character?

    Tried variable switching but couldn't figure that out. I can spawn another object by variables and delete the general sprite but that probably wont work with the general control event.

    Would an array work? i don't know.

    Thanks in advance for any insight.

  • Add the characters into a Family called Characters. Then you can trigger events that apply to every character.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • set the different characters as animation frames of only 1 sprite. create the events for the character sprite and choose the appropriate animation frame for the chosen character.

  • Thanks guys.

  • You can also use the Function plugin for things that all of the bots will share too.

    If everyone shoots bullets, you can have the bullet setup all in 1 function "shootBullet". Rather than having the action blocks for the "add bullet sprite", "add muzzle flash sprite", "reduce nearest bot ammo -1","PLay bullet shoot sound", "alert friendly player bots to gunshot location"...

    You can see it adds up really quick.

    I put off learning the function plugin until recently. I wish I would have read about it first, it would have saved me a lot of time debugging all my copypasta.

  • also, when copying the events for one player to the next, the "replace object" options really comes in handy!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)