How do I Change Characters Instantly?

0 favourites
  • 5 posts
From the Asset Store
120 Epic Fire FX Animations + 2 Bonus Characters. Contains 3000+ frames and a lot of Pixel Art Sprites
  • Alright, so basically what I'm trying to do is make it so that the player can swap between characters with the press of a button- each of these characters are intended to have their own unique skills for puzzle solving purposes. Problem is, I'm having trouble figuring out how to switch them out. I figured it'd be a matter of destroying the current instance of the character and all other possible instances of the characters, then spawning the intended character in the same spot, but either that's incorrect or I'm going about it wrongly. Here's the .capx for anyone to look at, but as it stands I'm kind of confused. ... .capx?dl=0

    Thanks for the help in advance!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I played with your capx (to no avail yet) ... .capx?dl=0

    But this needs rethinking. The problem is that you cant set (as far as i can see) the 'Directions' and the 'Set angle' properties on runtime for the 8Directions. So if those are properties that change with the characters, i dunno at this moment.

  • No, everyone has the same base movement speed, and they're basically intended to swap out just like that- whatever direction or angle the player is at in that moment stays consistent.

  • You are looking for System's "Create object" and not the Sprite's "Spawn object". "Spawn object" means that the sprites in the SOL will each spawn the selected object. "Create object" will create a single instance.

    However, for hotswapping between characters like this... it might be better to use a single object with multiple animations.

  • Yes a single object with different animations. That takes care of the graphical 'face'. If the characters are also defined by different instance variable value's, bringing the variables into an array will solve that. If however the characters have different 8direction properties (the used behavior), then i still have no idea yet.

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