How do I Add Speed Whenever I Reach Certain Score?

Get help using Construct 2

Post » Thu Jul 31, 2014 7:13 pm

Like the title said, how to add speed/difficulty of the game whenever the player reach certain score?

thanks
B
8
S
2
Posts: 203
Reputation: 1,169

Post » Thu Jul 31, 2014 7:19 pm

ijoin wrote:Like the title said, how to add speed/difficulty of the game whenever the player reach certain score?

thanks

Depends on what your game's speed is based, if on a simple time scale then, if value "PlayerScore" = 100 let's say, then set "System">"Time Scale" to timescale+(how much you want to add to a timescale).
B
22
S
9
G
7
Posts: 421
Reputation: 6,543

Post » Thu Jul 31, 2014 7:20 pm

One way of doing this is to make an event that compares the "score" variable and if it is equal or greater than for example 100 set speed to XX or whatever you want to do to make it more difficult.

EDIT: I was too late but we almost recommended the same solution :)
B
52
S
22
G
12
Posts: 727
Reputation: 11,720

Post » Thu Jul 31, 2014 7:22 pm

Sisyphus wrote:
ijoin wrote:Like the title said, how to add speed/difficulty of the game whenever the player reach certain score?

thanks

Depends on what your game's speed is based, if on a simple time scale then, if value "PlayerScore" = 100 let's say, then set "System">"Time Scale" to timescale+(how much you want to add to a timescale).



Here is the condition, the character speed will increase every time player's score incremented by 100, like, 200, 300, 400, ....

Of course I can do it if it's only a static condition like
If score = 100, set speed to 1000


But, this one is different

My brain can't think a way to do it :lol:
B
8
S
2
Posts: 203
Reputation: 1,169

Post » Thu Jul 31, 2014 7:24 pm

ijoin wrote:
Sisyphus wrote:
ijoin wrote:Like the title said, how to add speed/difficulty of the game whenever the player reach certain score?

thanks

Depends on what your game's speed is based, if on a simple time scale then, if value "PlayerScore" = 100 let's say, then set "System">"Time Scale" to timescale+(how much you want to add to a timescale).



Here is the condition, the character speed will increase every time player's score incremented by 100, like, 200, 300, 400, ....

My brain can't think a way to do it :lol:

Okay, and your character speed is based on ... ?
B
22
S
9
G
7
Posts: 421
Reputation: 6,543

Post » Thu Jul 31, 2014 7:27 pm

Global variable Currentspeed = 0

Everytime score reach increment by 100 like 100, 200, 300, ..
Add +1 to currentspeed

X Object move position angle 180, Currentspeed pixel
B
8
S
2
Posts: 203
Reputation: 1,169

Post » Thu Jul 31, 2014 7:29 pm

ijoin wrote:
Sisyphus wrote:
ijoin wrote:Like the title said, how to add speed/difficulty of the game whenever the player reach certain score?

thanks

Depends on what your game's speed is based, if on a simple time scale then, if value "PlayerScore" = 100 let's say, then set "System">"Time Scale" to timescale+(how much you want to add to a timescale).



Here is the condition, the character speed will increase every time player's score incremented by 100, like, 200, 300, 400, ....

Of course I can do it if it's only a static condition like
If score = 100, set speed to 1000


But, this one is different

My brain can't think a way to do it :lol:


Assuming it's linear like the example you suggested:

playerSpeed = score*10
if score >100
else playerSpeed = default
B
57
S
19
G
9
Posts: 639
Reputation: 9,533

Post » Thu Jul 31, 2014 7:36 pm

Mr E Bear wrote:Assuming it's linear like the example you suggested:

playerSpeed = score*10
if score >100
else playerSpeed = default

thanks!

It works well so far :D
B
8
S
2
Posts: 203
Reputation: 1,169


Return to How do I....?

Who is online

Users browsing this forum: HenryPK and 9 guests