'Lives', 'Timer' & Audio questions!

Get help using Construct 2

Post » Thu Apr 17, 2014 10:54 am

Hi guys!

I am a complete newb to Construct2 but I'm loving what I've seen so far ... anyway, I was wondering if you guys could help me with some things I'm struggling with? It's basic stuff but I keep getting it wrong somewhere. I didn't know which section my questions would come under specifically so I put it in this, hope that's ok?

I've taken this tutorial : https://www.scirra.com/tutorials/846/ea ... -our-games for the bike physics as the example for my first game ...

I've altered it a little to make it basic and have uploaded the capx for you to change.

I'm sure there are tutorials but I struggle with my concentration due to having ADHD and it makes it impossible for me to learn by just reading ... if you can change the capx file I will be able to see how it's done and learn from there by changing and experimenting :)

Ok, my questions ...
1. How do I set a timer between point A and point B in the game? I would like it to count down and the player loses a life if not completed in time ....

2. How do I give the player lives to begin with? I would like him to have 3 lives to start the game and gain extra life by collecting all of the tokens in a game ... the tokens I have put in the game are the green circles numbered 1,2 and 3.

AUDIO QUESTIONS

1. How to play a sound when 'accelerate' is pressed? I have uploaded the sound as 'rev' ... it seems to keep repeating the sound if the button is continuously pressed down ... is it possible to make it just play the sound file every time it's pressed, not continuously?

2. The sound when the bike crashes also seems to continuously play ... can the 'crash' noise just be played once?

All help appreciated and thank you in advance!!
You do not have the required permissions to view the files attached to this post.
B
3
Posts: 9
Reputation: 193

Post » Thu Apr 17, 2014 1:06 pm

I think i may be able to help with audio questions:

Question 1 answer:
Add keyboard input to your layer then in the event sheet:

On key pressed > play (under "General" and set to not looping)

That should work fine. I just tried it in a game of mine and it worked fine :)

Question 2 answer:
Similar to the last answer but when the bike crashes then play the sound. Add an event like:

Bike crashed > play (under "General" and set to not looping)

Again i just tried this and it worked fine. Let us know how you get on and sorry i cant help with the first two :)
B
11
S
2
G
1
Posts: 62
Reputation: 1,410

Post » Thu Apr 17, 2014 1:21 pm

Hi .. thanks for your time :) sorry but it makes no sense to me ... I tried and the noises still continue to play continously when you hold down the accelerate and also when it crashes :(
B
3
Posts: 9
Reputation: 193

Post » Thu Apr 17, 2014 1:23 pm

i'll check out the capx and try it out myself with my own sound clip, gimme a few mins :)

edit: nvm, youre sounds are in there, i'll try with those then :D
Last edited by moymoymoy on Thu Apr 17, 2014 1:25 pm, edited 1 time in total.
B
11
S
2
G
1
Posts: 62
Reputation: 1,410

Post » Thu Apr 17, 2014 1:24 pm

Thanks dude!! :)
B
3
Posts: 9
Reputation: 193

Post » Thu Apr 17, 2014 1:33 pm

Update: got the sound working on W key pressed, just checking out the crash one ^_^
B
11
S
2
G
1
Posts: 62
Reputation: 1,410

Post » Thu Apr 17, 2014 1:36 pm

Sorry dude, I was going to delete the keyboard controls and just have it for the touch controls ... is that a different thing altogether? The capx was from another tute, I've just made the track flat and added some sprites :/

*is that a different thing altogether or do I apply the same thing to the touch control?
B
3
Posts: 9
Reputation: 193

Post » Thu Apr 17, 2014 1:38 pm

Okay i'll have a look at it but ive not dealt with touch controls before so bare with me :P

Update however: crash sound plays once when crashing.... so far ;)
B
11
S
2
G
1
Posts: 62
Reputation: 1,410

Post » Thu Apr 17, 2014 1:41 pm

Sweeeeeheeeeet!! Thanks for your time dude, really appreciated!!
B
3
Posts: 9
Reputation: 193

Post » Thu Apr 17, 2014 1:48 pm

I GOT IT, WILL UPLOAD CAPX NOW :D
B
11
S
2
G
1
Posts: 62
Reputation: 1,410

Next

Return to How do I....?

Who is online

Users browsing this forum: dop2000 and 46 guests