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
Script Help PlaySoundAtEntity is not working
Odin0181 Offline
Junior Member

Posts: 4
Threads: 1
Joined: Oct 2011
Reputation: 0
#1
PlaySoundAtEntity is not working

Hello I have just started making my own custom story, and i have a problem with scripting.
I just want to make so that a sound plays on a entity (player in this case) when i pick up a key, but nothing happens!
Here is the code:


void OnStart()
{
SetEntityCallbackFunc("key_study_1", "Break");
}

void Break(string &in asEntity, string &in type)
{
SetPropHealth("barrel01_2", 0.0f);
SetPropHealth("barrel01_3", 0.0f);
SetPropHealth("barrel01_4", 0.0f);
SetPropHealth("barrel01_1", 0.0f);
StartPlayerLookAt("human_skull_1", 5, 5, "Break2");
PlaySoundAtEntity("", "react_scare.snt", "Player", 2, false);
}


Thanks for your help Smile


10-19-2011, 05:13 PM
Find


Messages In This Thread
PlaySoundAtEntity is not working - by Odin0181 - 10-19-2011, 05:13 PM
RE: PlaySoundAtEntity is not working - by Elven - 10-19-2011, 08:20 PM
RE: PlaySoundAtEntity is not working - by Elven - 10-19-2011, 08:32 PM
RE: PlaySoundAtEntity is not working - by Elven - 10-19-2011, 09:10 PM
RE: PlaySoundAtEntity is not working - by Elven - 10-19-2011, 09:27 PM



Users browsing this thread: 1 Guest(s)