Help, Why doesn't my variable and logic work?

  • I put the link of the project by what I despair, I thought I understood but it's probably not the case because my variable doesn't work, I want every time an enemy dies, the speed of each enemy increases but it doesn't work at all, I have trouble understanding, if you can check my code please.

    dropbox.com/s/gutm7yp2iajvqpu/FunShooter%20%2822%29.c3p

  • I would like an enemy to die every timeI'm a little confused, I'm sorry. I have trouble because I don't speak English, I use a translator and it doesn't always translate properly

    I apologise I missed the part where you need to do it after the enemies Die

    is the same thing but you add an extra Condition

    Add a Global Variable = EnemySpeed

    Add an Instance Variable to the FamylyEnemy = Health

    Bullet On Hit FamilyEnemy: Action: Subtract (Your Value) From FamilyEnemy.Health

    SubEvent: FamilyEnemy Health <=0: Action Add 100 to (Global Variable = EnemySpeed)

    ===============================>Action FamilyEnemy Destroy

    SubEvent: System: Pick All _FamilyEnemy: Action set PathFinder MaxSpeed to (Global Variable = EnemySpeed)

    ==============================

    Also Every time you Spawn an Enemy as you do on your Event 47

    add an extra action after you create the object set FamilyEnemy PathFinder MaxSpeed to (Global Variable = EnemySpeed)

  • I don't understand why you need an instance variable in addition to the global variable? why do we need health???? the enemy group already has a health variable, I give them a global life variable

  • the enemy group already has a health variable, I give them a global life variable

  • I didn't check whole your project so I'm not sure how you set up everything I just Looked at the Problem with your Speed, but normally you put everything together (Collisions & Check for Health) on the same Event so if you like to do it in your way you can modify it to your Needs

    here are the Events you need:

  • thanks with the visual example it seems clearer to me, thanks a lot you unlocked me

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • and sincerely a big thank you, I'm sorry, I must have been a little annoying

  • and sincerely a big thank you, I'm sorry, I must have been a little annoying

    No Problem mate :):) Glad you fixed

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