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


Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Random Integer Script doesn't work please help
X4anco Offline
Member

Posts: 157
Threads: 66
Joined: Apr 2011
Reputation: 0
#3
RE: Random Variable Integer

Thank-you Big Grin Big Grin Big Grin Big Grin
Now I has a problem with my script Sad


void ScarySoundsTimer(string &in asTimer)
{
int ScarySoundsVar = RandInt(1, 2, 3, 4, 5, 6, 7);
switch(GetLocalVarInt(ScarySoundsVar)){
case 1:
PlaySoundAtEntity("babycry", "scare_baby_cry.snt", "Player", 0.2, false);
AddTimer("", 20, "ScarySoundsTimer");
break;

case 2:
PlaySoundAtEntity("babycry", "scare_animal_squeal.snt", "Player", 0.2, false);
AddTimer("", 16, "ScarySoundsTimer");
break;

case 3:
PlaySoundAtEntity("babycry", "scare_male_terrified.snt", "Player", 0.2, false);
AddTimer("", 25, "ScarySoundsTimer");
break;

case 4:
PlaySoundAtEntity("babycry", "scare_wood_creak_walk.snt", "Player", 0.2, false);
AddTimer("", 13, "ScarySoundsTimer");
break;

case 5:
PlaySoundAtEntity("babycry", "scare_steps_big.snt", "Player", 0.2, false);
AddTimer("", 19, "ScarySoundsTimer");
break;

case 6:
PlaySoundAtEntity("babycry", "scare_wood_creak_scuf.snt", "Player", 0.2, false);
AddTimer("", 19, "ScarySoundsTimer");
break;

case 7:
PlaySoundAtEntity("babycry", "insanity_baby_cry.snt", "Player", 0.2, false);
AddTimer("", 19, "ScarySoundsTimer");
break;
}
}

void ScarySounds(string &in asParent, string &in asChild, int alState)
{
SetLocalVarInt("ScarySoundsVar", 0);
AddTimer("quescary", 5, "ScarySoundsTimer");
}


Can you see where I go wrong?

...
(This post was last modified: 08-06-2011, 02:50 PM by X4anco.)
08-06-2011, 02:24 PM
Find


Messages In This Thread
RE: Random Variable Integer - by Juby - 08-06-2011, 02:22 PM
RE: Random Variable Integer - by X4anco - 08-06-2011, 02:24 PM



Users browsing this thread: 2 Guest(s)