Probleme with Timing the shooting

Get help using Construct 2

Post » Wed Feb 05, 2014 12:33 pm

I'll try to explain may problem. I want to slow the shooting rate of the player. So I try lot of solutions. Here the last one but it's not working.



Can you explain what I did wrong?

Thanks
B
4
Posts: 3
Reputation: 206

Post » Wed Feb 05, 2014 12:49 pm

The problem you have is the last event : "player isReloading". Let's see how the computer will work with your script :
- Ctrl pressed, set isShooting = true.
- isShooting=true ? then start fire, and set isReloading = true
- isReloading = true ? then wait 1 second and setReloading to false.

Last event will be checked every tick, and so, every tick for 1 second, you will start a waiting period of 1 second and then set Reloading to false. This will make the Reloading set to false all ticks for 1 second basicaly.

What you need to do : add a condition "Once while true" on the last event.
B
17
S
8
G
4
Posts: 473
Reputation: 6,221

Post » Wed Feb 05, 2014 1:25 pm

Ohh thanks a lot. I understand. I have one more question please. For you what is the best way.
This one ?


or this one
Ernata2014-02-05 13:25:52
B
4
Posts: 3
Reputation: 206

Post » Wed Feb 05, 2014 1:45 pm

Both seem ... equal. I wouldn't go with any of those though.

What I would do :
B
17
S
8
G
4
Posts: 473
Reputation: 6,221


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 9 guests