How do I make an skill level detector?

0 favourites
From the Asset Store
JBoB Sound Studio "RPG SKILL SOUND" Pack contain royalty-free stock sound effects
  • Ay bois, this time, i'm trying to make an skill level detecto for my game. So, when an enemy spawns, he will get 4 stats with some values. These stats will make the Power Level of the enemy. Now, my objective is, to detect the power level of the enemy, and, make some specific thing, like this:

    If, PlayerCube.PowerLevel < EnemyCube.PowerLevel / 2 then

    EnemyCube set animation: Hard

    So, i want to check multiple times to give more difficulty tiers to the player know that, the boy they're facing is strong.

    If, PlayerCube.PowerLevel < EnemyCube.PowerLevel / 4 then

    EnemyCube set animation: Ultra

    But, obviously we can see that the 2 event overlap the first event. My problem here, is, the overlap btw. I tried making new triggers, or, using for each / a lot of things, but, my brain cell can't think in a way to solve this. So, please, if you know how to make that i want ( and if is good enough ), please tell me!

    Edit: If you know, how to make an better skill level detector, please tell me too!

  • What overlap are you referring to, do you mean when they can both be true? You can list the conditions in order from easy to hard so it always sets the hardest one meaning if you qualify for easy, hard, ultra it will set ultra and if you qualify only easy, hard but not ultra then it would set hard and ignore ultra etc.

  • What overlap are you referring to, do you mean when they can both be true? You can list the conditions in order from easy to hard so it always sets the hardest one meaning if you qualify for easy, hard, ultra it will set ultra and if you qualify only easy, hard but not ultra then it would set hard and ignore ultra etc.

    Hey bro! And yes, they overlap when these 2 are active. Like, if the Pl of the player is Lower than EnemyCube.PL / 4, they will also trigger the Hard if they power level is lower than EnemyCube.PL / 2, and, these two will glitch and the animation will lock in the Ultra, or, sometimes glitch and lock in hard no matter what. I tried listing in order but didn't worked :c, i'm really trying to think something to fix it. If you want to view the code, see the link below.

    Link: imgur.com/a/mgxLsn8

  • Because you're running it constantly, you need to assign it once since that's the kind of mechanic you're going for.

  • Because you're running it constantly, you need to assign it once since that's the kind of mechanic you're going for.

    I need it to run constantly because the player will level up every kill, so, the power level of the player will constantly changes, that's why i need an checker.

  • Yes so run it when the player levels up

  • Yes so run it when the player levels up

    That's a good idea btw, gonna try it! Thanks for the solution bro!

  • Yes so run it when the player levels up

    Didn't worked, they are glitching in the same way. But, i need to change my code, it's obviously not working and is a bad code, but, i can't think in a better way to do it.

  • Let's see the new code and tell me the example values you have for player and enemy level.

  • Let's see the new code and tell me the example values you have for player and enemy level.

    i'm gonna send you the capx, and, thanks for the help bro! ( Btw, i already removed the level thing, i realised that they are a trigger like the 0,001 seconds but a lot slower xd )

    You can use the debug tester to change values of the Power Level. ( They scale with health, level and damage. If you can make to him scale with firerate, i would really appreciate it! I didn't do because, the lower the firerate, the stronger it is ( like, it's firerate ) )

    Link: dropbox.com/s/aesu63sp6gd0wnh/Cube%20Up%21.capx

  • Is there any way you can remove that plugin CB Hash? I'm using Construct 3.

  • Is there any way you can remove that plugin CB Hash? I'm using Construct 3.

    Sorry, gonna remove it.

  • Is there any way you can remove that plugin CB Hash? I'm using Construct 3.

    The link of the .capx: dropbox.com/s/in6l8kwpzvguq50/Cube%20Up%21.capx

  • Remove the every 0.0001 as mentioned. Also a condition on the 'medium' one, player is greater than enemy seems wrong because it overrides all 'easy' so remove that.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Remove the every 0.0001 as mentioned. Also a condition on the 'medium' one, player is greater than enemy seems wrong because it overrides all 'easy' so remove that.

    But, i can't remove that because i need then to compare like that i said in this post. I don't know how to make an decent detector, and, the code of this one is bad. I need it to detect if the player is stronger, or if is a bit weaker to make then to go in the medium animation.

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