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
Playsound at SetEntityPlayerlookatCallback?
Tiger Away
Posting Freak

Posts: 1,874
Threads: 16
Joined: Nov 2012
Reputation: 55
#1
Playsound at SetEntityPlayerlookatCallback?

So, There's a part where I want the player to look at a decal and they'll hear a sound and get sanity damage(No, it's not a jumpscare, trust me). I've tried coding this script kinda from scratch, but also used this.
I've checked the wiki, youtube and tried googling it but I can't find anything about it. Here's my script right now:

Spoiler below!

OnStart()
{
SetEntityPlayerLookAtCallback("blodsplat_1", "screamtrigger", true);
}

void screamtrigger(string &in asEntity, int alState)
{
PlaySoundAtEntity("", "21_scream5.snt", "stove_1", 0.8f, false);
GiveSanityDamage(10.0f, false);
}



the "blodsplat_1" is an entity-decal and I've changed it's "playerlookatcallback"-box to "screamtrigger". I've tried solving this for over an hour now and I'm starting to get frustrated Undecided
I would really appreciate help.
(This post was last modified: 02-03-2013, 01:51 PM by Tiger.)
02-02-2013, 09:27 PM
Find


Messages In This Thread
Playsound at SetEntityPlayerlookatCallback? - by Tiger - 02-02-2013, 09:27 PM



Users browsing this thread: 1 Guest(s)