solved How do I Level up monster every max score

0 favourites
  • 2 posts
From the Asset Store
Support AdType ( AppOpenAd, Banner Ad, Interstitial Ad Rewarded Ad, MREC Ad) support c3 build service
  • One question :

    variable_maxscore = 5000

    if maxscore >= 5000 -> enemy add to private variable hp 100 , exp 100 , dmg 100 add to maxscore previous value score

    the problem is that this formula does not add private variables to monsters

    the game is endless runner so enemy is created for every 2 or 3 or 4 seconds

    basically its something like that

    enemy -> on created -> score -> maxscore -> enemy add 100 hp , etc...

    It doesn't work , i think that something is wrong with my logic

    please help or just reply topic i just explain it better to you

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • When an object is created, its instance variables are set to the default values. So if I follow correctly your code won't work, since you'll be only adding to the values of the existing monsters.

    To solve the problem, add some globals called enemy_hp, enemy_exp, enemy_dmg etc and add to those. Then, when spawning an enemy, set it's instance variables to those globals.

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