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


Thread Rating:
  • 1 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Loading Screen
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#8
RE: Loading Screen

(08-31-2014, 01:44 PM)DnALANGE Wrote: yes it is possible..
Add a randint to it.
Then make the script choose the sound\message itself.
Here is anexample:

PHP Code: (Select All)
        /////ActivateOtherRandomSoundsOutside////
        
void StarttheScreams(string &in asParentstring &in asChildint alState)
{
if(
alState == 1)
{
SetLocalVarInt("TimerSCreams"1);
AddTimer("StopScreamsOutside_"+RandInt(1,7), RandInt(3,15), "TimerLooScreams");
PlaySoundAtEntity("""afx_spooky_eerie_monster_type2.snt""Player"0true);
}

if(
alState == -1)
{
SetLocalVarInt("TimerSCreams"0);
}
}

void TimerLooScreams(string &in asTimer)
{
if(
GetLocalVarInt("TimerSCreams") == 1)
{
if(
asTimer == "StopScreamsOutside_1")
{
PlaySoundAtEntity("""afx_spooky_eerie_monster_type2.snt""Player"0true);
AddTimer("StopScreamsOutside_"+RandInt(1,2), RandInt(4,25), "TimerLooScreams");
}
if(
asTimer == "StopScreamsOutside_2")
{
PlaySoundAtEntity("""afx_spooky_eerie_monster_type2_louder.snt""Player"0true);
AddTimer("StopScreamsOutside_"+RandInt(1,2), RandInt(3,24), "TimerLooScreams");
}
}

The above is for other things but it is how it can look, but learn the script and try yourseld by testing rand variables.

Another alternative is to use RandInt and Switch statements. I used it and it's working fine and well. Heck, I even made a thread on how to make your stuff to randomize. Originally it's for scares but you can repurpose it as you wish.

"Veni, vidi, vici."
"I came, I saw, I conquered."
08-31-2014, 02:43 PM
Find


Messages In This Thread
Loading Screen - by Catalyst - 08-30-2014, 07:31 PM
RE: Loading Screen - by Mudbill - 08-30-2014, 09:10 PM
RE: Loading Screen - by Catalyst - 08-31-2014, 01:05 PM
RE: Loading Screen - by Romulator - 08-31-2014, 01:19 PM
RE: Loading Screen - by Catalyst - 08-31-2014, 01:28 PM
RE: Loading Screen - by DnALANGE - 08-31-2014, 01:44 PM
RE: Loading Screen - by PutraenusAlivius - 08-31-2014, 02:43 PM
RE: Loading Screen - by Catalyst - 08-31-2014, 02:16 PM
RE: Loading Screen - by burge4150 - 09-02-2014, 03:03 PM



Users browsing this thread: 1 Guest(s)