variable adjustment

0 favourites
  • 2 posts
From the Asset Store
Easily store, modify, read and manipulate colors with Color Variables!
  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I usually use a global variable to scale enemy difficulty, along with a "boss" group (activated when it is time for the boss to appear)

    for example I could have a variable called minionhealthscale set to 1.

    when creating minions, do this:

    condition

    loop: 20 times;[/code:2olbnvnu]action[code:2olbnvnu]create: minion at (x,y)[/code:2olbnvnu]action[code:2olbnvnu]set minion.life: =10*minionhealthscale[/code:2olbnvnu] - this makes the minion health correctly when each minion is created
    
    then to activate your boss group:
    condition[code:2olbnvnu]minions destroyed: =20[/code:2olbnvnu]action[code:2olbnvnu]set group "boss" enabled[/code:2olbnvnu]
    
    Then your boss group would have these codes in it:
    [code:2olbnvnu]BOSS GROUP[/code:2olbnvnu]
    [code:2olbnvnu]various boss creation and attack codes etc[/code:2olbnvnu]
    
    when the boss is defeated:
    conditions[code:2olbnvnu]bosshealth < 1;trigger once while true;[/code:2olbnvnu]action[code:2olbnvnu]boss: destroy[/code:2olbnvnu]
    action[code:2olbnvnu]set minionhealthscale: =minionhealthscale*10[/code:2olbnvnu]
    action[code:2olbnvnu]disable group "boss"[/code:2olbnvnu]
    
    obviously the way you scale minionhealthscale will affect how much more health the minions have each time the boss group activates. Above I have it so that the minion health multiplies by 10 after each boss, so your minions might have 10 health, then 100 health, then 1000 and so on. You could use +10 which would just make it 1 11 21 31 41 etc, or any equation you want to balance your game.
    
    I hope this helped * edit made it clearer and more relevant to your needs
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)