Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Random variables
Omenapuu Offline
Junior Member

Posts: 31
Threads: 8
Joined: Oct 2013
Reputation: 1
#2
RE: Random variables

(10-30-2013, 08:21 PM)Robosprog Wrote:
PHP Code: (Select All)
if(RandInt(18) == 8){PlaySoundAtEntity("""scare_animal_squeal.snt""Player"0.60false);}
    else if(
RandInt(1,8) == 7){PlaySoundAtEntity("""scare_human_noices.snt""Player"0.60false);}
    else if(
RandInt(1,8) == 6){PlaySoundAtEntity("""scare_male_terrified.snt""Player"0.60false);}
    else if(
RandInt(1,8) == 5){PlaySoundAtEntity("""scare_wood_creak_mix.snt""Player"0.50false);}
    else if(
RandInt(1,8) == 4){PlaySoundAtEntity("""scare_ghost.snt""Player"0.60false);}
    else if(
RandInt(1,8) == 3){PlaySoundAtEntity("""scare_walk_ghost.snt""Player"0.40false);}
    else if(
RandInt(1,8) == 2){PlaySoundAtEntity("""scare_baby_cry.snt""Player"0.60false);}
    else if(
RandInt(1,8) == 1){PlaySoundAtEntity("""scare_steps_big.snt""Player"0.40false);} 

This is how I used them, if that gives an idea of how they work? Nothing else required.


Thanks! I totally forgot else if statements..
10-30-2013, 09:09 PM
Find


Messages In This Thread
Random variables - by Omenapuu - 10-30-2013, 07:49 PM
RE: Random variables - by Adrianis - 10-31-2013, 03:12 AM
RE: Random variables - by PutraenusAlivius - 10-31-2013, 07:40 AM



Users browsing this thread: 1 Guest(s)