Monday, 3 March 2014

Randomising sound

Into the build this week I added a bit of code that makes random sounds play, with regard to things such as our doors the sounds trigger on contact with an object tagged as 'door' then play 1 of 7 random sounds. to optimise this I may later add a line of code preventing repetition of the same sound after it was last called.

This code has also proven useful for the character to say random lines of dialogue and for additional atmosphere with things such as lightning .

Labels: ,

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home