News:

MFG's Character of the Month: October 2026 Nominations

Main Menu

randomizing sounds

Started by the mummy, May 13, 2008, 06:40:11 AM

Previous topic - Next topic

the mummy

   
ok, in case the title was not clear, I would like to play a random sound clip. the trigger would stay the same
but the sound should be random, I cant figure out how to do it. if anyone can help, it would be appreciated.
:egypt:

Fallen_angel

If I remember well to do that you could use these

value =100+(random%6)

it only works if the sound is in order like 100,101..etc....what I wrote its just an idea you will need to code it properly, I think that random%6, gaves you value from 100 to 1005

Rōjenomu

Quote from: Fallen_angel on May 13, 2008, 06:59:48 AM
it only works if the sound is in order like 100,101..etc....what I wrote its just an idea you will need to code it properly, I think that random%6, gaves you value from 100 to 1005

you mean 105
so
100 101 102 103 104 105 are 6 posibilities, therefore %6
Spoiler (click to show)

QuoteLord Canti Says:
i was playing FFVII and I accidently named Red XIII Cyanide D:

Fallen_angel