make game harder !

Get help using Construct 2

Post » Fri Aug 23, 2013 9:07 am

Thanks you All

((you need to keep checking the score, then check to see if you already increased the health for that range. I'd make 2 variables. "PlayerLevel" that tells you which range you are in: (score / 100) then you need to round down. i.e. 950 / 100 is 9.5 then round down to 9 and you are at level 9. The other variable is the current enemy's level "EnemyLevel". Compare this to the player's level and if they aren't equal, then you know your score went to the next range. Remember levels are base zero.

initialize PlayerLevel set to 0
initialize EnemyLevel set to 0

game loop

//get the player's current level from the score
set value PlayerLevel to Round down (Score / 100)

//check to see if it's beyond the last time you increased the enemy's health
if PlayerLevel > EnemyLevel
    add 10 to Enemy.health
    add 1 to EnemyLevel

this assumes you can't lose points off your score...))


still i have that problem :(

watch this :

https://www.dropbox.com/s/odssg63xkozu8oc/sample%20bullet.capx
B
10
S
3
G
2
Posts: 46
Reputation: 2,025

Post » Fri Aug 23, 2013 7:43 pm

plz help me ....
B
10
S
3
G
2
Posts: 46
Reputation: 2,025

Post » Fri Aug 23, 2013 11:52 pm

I haven't looked at your capx yet.. not home.. but did you make your variables global?

Make a text field on the screen and populate it with EnemyLevel and PlayerLevel variables.. it will show you what's happening to those variables.. if they are getting reset somehow..

the top of your screen should look like this:
Score: 350 PlayerLevel:3 EnemyLevel:3 EnemyHealth: 35 (or whatever)
then
Score: 425 PlayerLevel:4 EnemyLevel:4 etc..........

if the Level variables are not the correct values, I think you'll probably figure it out from there...

I'll check it out the capx later...
B
100
S
33
G
16
Posts: 1,204
Reputation: 16,865

Post » Sat Aug 24, 2013 12:42 am

okay.. figured it out...

https://dl.dropboxusercontent.com/u/36234790/sample%20bulletMOD.capx
B
100
S
33
G
16
Posts: 1,204
Reputation: 16,865

Post » Sat Aug 24, 2013 12:47 am

you were only referencing some of the enemies.. and not the original instance from your layout.

I added another variable.. "NewSpeed".. which I set the enemy to everytime one was created. I don't know if there's a way to change the initial state..

and I let the old enemies keep their speed... just all new enemies had the new speed... if you want all enemy to be set instantly to the NewSpeed then enable that line I had in there after the check of PL>EL

also you were dividing by 150? it should be 100...
B
100
S
33
G
16
Posts: 1,204
Reputation: 16,865

Post » Sat Aug 24, 2013 11:14 am

THX alot i solve it
B
10
S
3
G
2
Posts: 46
Reputation: 2,025

Previous

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 20 guests