Help Not Sure Why This Is Happening

0 favourites
  • 3 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • Alright so I was using 1 player character so far in the game, and wanted to start setting things up to allow for a character selection. I am using global variables and an object of playerstart that would spawn the player character in the level depending on which variable was set to 1. The two global variables are playerAssassin and playerGnome1, currently playerGnome1 is set to 1 and playerAssassin is set to 0

    At first it spawned at the location but the player wouldn't move outside of the starting box even though it wasn't a solid, but the animations would play. I tried both create object and spawn object. So removed the player start box and function call and just put the player back in without calling the function to see which player character was active, and the camera was suddenly not where the player sprite was when i loaded the level, this is for layout level 1_1, can't get this fixed now.

    Tried mimicking the same thing on layout level 1_2 and same thing with player being restricted to the spawn point object but when I played this object it seemed like the player was under an object that shoots out flame some distance away from the player as the health was constantly decreasing even though the player was actually not around anything that would cause damage. When i remove the player box and function and just put the player in level 1_2 it scrolls to player, so level 1_1 is really messed up and no idea why it's doing that. tried closing and re-opening, thinking it was just an editor glitch but same problem.

    not sure if that makes sense lol

    here is the capx:

    https://drive.google.com/open?id=1udeI7rypKsU3amPzP--10Z2LBvwgsIDE

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Your capx requires several third-party addons, one of which is commercial.

    If I understand correctly, you added a second character object and it's causing all kind of problems.

    I think it would be much easier to have just one character object with multiple animations.

    Your animations can be like this:

    AssassinIdle

    AssassinRun

    AssassinAttack

    GnomeIdle

    GnomeRun

    GnomeAttack

    Also, add an instance variable "characterType".

    As a result, you should be able to add new characters to your game with very minimal changes to your events.

    For example:

    On Space key pressed -> Character set animation to self.characterType & "Attack"

  • Your capx requires several third-party addons, one of which is commercial.

    If I understand correctly, you added a second character object and it's causing all kind of problems.

    I think it would be much easier to have just one character object with multiple animations.

    Your animations can be like this:

    AssassinIdle

    AssassinRun

    AssassinAttack

    GnomeIdle

    GnomeRun

    GnomeAttack

    Also, add an instance variable "characterType".

    As a result, you should be able to add new characters to your game with very minimal changes to your events.

    For example:

    On Space key pressed -> Character set animation to self.characterType & "Attack"

    Ok thanks I will try that out. I may have to just rebuild the first level layout, since the capx can't be viewed. For whatever reason it's as if its putting the player about 500 pixels to the right of where it actually is and the sprite isn't even on the screen anymore, really weird

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