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:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Play sound only ONCE
machosalad Offline
Junior Member

Posts: 38
Threads: 8
Joined: Oct 2010
Reputation: 0
#1
Play sound only ONCE

I am using this script to play a sound when player collides with an area:

void OnStart()
{
AddEntityCollideCallback("Player", "Area1", "PlaySound1", false, 0);
}


void AreaSound1(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("","amb_alert.snt", "mansion_1", 0, false);
}

However it plays the sound everytime the player enters or leaves the area! How do i make it play only once?
11-09-2010, 05:35 PM
Find


Messages In This Thread
Play sound only ONCE - by machosalad - 11-09-2010, 05:35 PM
RE: Play sound only ONCE - by Som1Lse - 11-09-2010, 05:51 PM
RE: Play sound only ONCE - by machosalad - 11-09-2010, 05:57 PM
RE: Play sound only ONCE - by DamnNoHtml - 11-09-2010, 10:22 PM



Users browsing this thread: 1 Guest(s)