When a character re spawn's how do i set the number of bullets left before he is dead ?

0 favourites
  • 2 posts
From the Asset Store
A whole set you need to create a gorgeous winter 2d game
  • Hello all,

    Greetings,

    I need a help regarding character bullet values.

    In the game, I am creating character will collect some potion which will add 4 points in the bullet section which has a maximum level of 10 points.

    The problem I am having here is for example if the character has say around 10 bullets and he used 5 out of them before the death and when he respawn's at a checkpoint the value is back to "0" but where i wanted to respawn with the balance value in this case he should be having 5 bullets.

    Can some one help me with this issue, I am seriously stuck at this point.

    Below are the events i used :

    Created a instance variable for the bullet(Power)

    Can any one help me out with a fix for this please.

    Thanks in advance.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Using global variables solves this problem, it keeps the value. Better to use this for player stats than instance variables on the object. Even if you kept the instance variables on player, the only way I can see to solve this is to store the bullets as a global variable anyway and then apply it to the new player object, so might as well use globals!

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