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
Sound at Entity
mr.bonent Offline
Junior Member

Posts: 47
Threads: 13
Joined: May 2011
Reputation: 0
#1
Sound at Entity

Hey guys!

I want to play a Sound on a Entity when the Player enters an area.
It doesn't work yet. Here my script.
Thanks for help.[/quote]

Quote:void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "BuchErscheinung", true, 1);
AddEntityCollideCallback("Player", "DoorClosedArea_1", "DoorClosedAndLook", true, 1);
AddEntityCollideCallback("Player", "DoorClosedArea_1", "DoorSchrei", true, 1);
}
void BuchErscheinung(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("buch", true);
AddDebugMessage("buch", false);
}
void DoorClosedAndLook(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("mansion_6", true, true);
StartPlayerLookAt("mansion_6", 10.0f, 10.0f, "");
AddTimer("", 1.0f, "stoplook");
}
void DoorSchrei(string &in asParent, string &in asChild, int alState);
{
PlaySoundAtEntity("Schrei", "05_event_door_bang.snt", "mansion_6", 2.0f, false);
StopSound("Schrei", 5.0f);
}
void stoplook(string &in asTimer)
{
StopPlayerLookAt();
}
void OnEnter()
{
}
void OnLeave()
{
}


Attached Files
.jpg   error_.jpg (Size: 6.96 KB / Downloads: 128)
(This post was last modified: 07-31-2011, 11:03 PM by mr.bonent.)
07-31-2011, 11:02 PM
Find


Messages In This Thread
Sound at Entity - by mr.bonent - 07-31-2011, 11:02 PM
RE: Sound at Entity - by MrCookieh - 07-31-2011, 11:16 PM
RE: Sound at Entity - by mr.bonent - 07-31-2011, 11:36 PM
RE: Sound at Entity - by Janni1234 - 07-31-2011, 11:37 PM
RE: Sound at Entity - by Angerpull - 07-31-2011, 11:53 PM
RE: Sound at Entity - by Kyle - 08-01-2011, 12:10 AM
RE: Sound at Entity - by MrCookieh - 08-01-2011, 12:06 AM
RE: Sound at Entity - by mr.bonent - 08-01-2011, 04:45 PM
RE: Sound at Entity - by Kyle - 08-01-2011, 04:55 PM



Users browsing this thread: 3 Guest(s)