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?
GoranGaming Offline
Member

Posts: 183
Threads: 30
Joined: Feb 2012
Reputation: 7
#2
RE: Playsound at SetEntityPlayerlookatCallback?

You could create an area at the decal, and if the player looks at the area the event happens.

void OnStart()
{
SetEntityPlayerLookAtCallback("ScriptArea_1", "ScreamTrigger", true);
}

void ScreamTrigger(string &in asEntity, int alState)
{
PlaySoundAtEntity("", "21_scream.snt", "stove_1", 0.8f, false);
GiveSanityDamage(10, false);
}


Hej btw

Current projects:

The Dark Prison 85 % (Stopped working on this one)

Unnamed Project 7 %
(This post was last modified: 02-02-2013, 10:36 PM by GoranGaming.)
02-02-2013, 10:23 PM
Website Find


Messages In This Thread
RE: Playsound at SetEntityPlayerlookatCallback? - by GoranGaming - 02-02-2013, 10:23 PM



Users browsing this thread: 1 Guest(s)