The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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
Help with "advanced widget script"
Ge15t Offline
Junior Member

Posts: 48
Threads: 8
Joined: Feb 2011
Reputation: 0
#1
Help with "advanced widget script"

void OnStart()
{
    AddEntityCollideCallback("Player", "StartFootsteps", "ScaryFootsteps", true, 1); //add to your OnStart()
}

void ScaryFootsteps(string &in asParent, string &in asChild, int alState)
{
    for(int s=1;s<11;s++) AddTimer("step"+s, 0.8 * s, "CreateFootstep");
}

void CreateFootstep(string &in asTimer)
{
    PlaySoundAtEntity("scary"+asTimer, "stepfile.snt", asTimer, 0, false);
    if(asTimer == "step2") {
        //Do some scary stuff
    }

Ok so this is the the script that I want to play with the foot step noises, but i cant seem to get it working. Can someone help me out here? the footsteps file is scare_wood_creak_mix.snt.

I just need some clearer instructions on what exactly the
(int s=1;s<11;s++) AddTimer("step"+s, 0.8 * s, "CreateFootstep");
code means and how to structure the script properly.
05-07-2011, 03:19 PM
Find


Messages In This Thread
Help with "advanced widget script" - by Ge15t - 05-07-2011, 03:19 PM
RE: Help with "advanced widget script" - by Apjjm - 05-07-2011, 05:26 PM
RE: Help with "advanced widget script" - by Ge15t - 05-08-2011, 06:41 AM
RE: Help with "advanced widget script" - by Apjjm - 05-08-2011, 02:32 PM



Users browsing this thread: 1 Guest(s)