Instance variable adjustment

0 favourites
  • 7 posts
From the Asset Store
Color Variable
$4.50 USD
10% off
Easily store, modify, read and manipulate colors with Color Variables!
  • The game is going good.

    At the end of the level (20 minions dead) I put a boos a lot harder to kill, if you do so, you get your points and all that, but the tricky part is that killing the boss must update an instance variable called life, in order to make the minions a little more dificult.

    This works only in the life span of the boss, every spwaned minion during the lifetime of the boss comes with the new variable but when you kill the boss they spawn with the initial life.

    Any manual or link who can help me?

    ArcaneBits

  • When you create objects, those objects are automatically picked.

  • Sure, but the life variable goes back to the original value, does not keep spawning monsters with the new value asigned when i killed the boss.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So just use a global. Change the global when you spawn the boss. IE spite.value + global.value.

  • Sounds nice to me, now, the exact question is how to i make that the SPAWN each every 3 seconds do the sprite.life=golbal(updated)+sprite.life

    I really apretiate your help, im kinda noob with Construct

    Arcanebits

  • Not sure exactly what you mean, but what you described would look like:

    +-global.value(canspawn)= 1

    ->every 3 seconds system create object sprite ant x,y

    -->sprite set value life to sprite.value("life")+ global.value("life")

    Thats with global.value("life") set to 0 initially.

    When you create the boss set the global to the "updated" value, you can also change that value when you destroy the boss.

  • You where right, just after killing the boss i managed to lvl-up the minions by updating the global and then after each new minion:

    Value=Biencuidao.vida+Dificultad

    Thanks

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