iain game maker

Post on 09-Aug-2015

48 Views

Category:

Food

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Programming sounds into Game makerBen White

To begin, I began by firstly programming a sound that played once the arrow object is created. When this object is created in-game, it means that an archer has fired it, so I needed a sound to convey that and arrow had been shot. I went to the ‘create’ tab as the sound needed to be played as soon as the arrow was implemented or created, added a sound option, selected the right sound and made sure it did not loop.

This sound is to be played as soon as the game starts and is the games back ground music. I did the same as before, but I added the sound on a ‘create’ tab on my player as the sound should stop and start when he is currently alive in-game. I needed this to loop too, so I made sure this option was set to true.

Programming this sound was quite different. I had to actually script it into the game. The sound plays when an enemy is defeated, and this is would be very complicated to do following previous methods so I made sure that the game would check if an enemy was deceased in a script before playing this sound. I used the ‘audio_play_sound()’ code.

This sound is to be played whenever the character jumps, so I coded it so that when the character jumps and is in the air, this sound will play.

Here, when the character shoots his flames, I would like two sounds to play. There is a flame noise and a triple hit noise, as when he attacks, he shoots 3 fire balls one after another. I added a sound action into the ‘Press C-key’ tab as this was the attack button. When C is pressed, both sounds will play and they will not loop.

top related