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
"AddEntityCollideCallback" issue
Nitrowing Offline
Junior Member

Posts: 16
Threads: 4
Joined: Dec 2010
Reputation: 0
#1
Question  "AddEntityCollideCallback" issue

Trying to make a sound play as the player touches an entity. Areas don't seem to work so I'm resorting to using a patch-o-blood entity as my trigger.

OnEnter part:
////////////////////////////
// Run when entering map
void OnEnter()
    {
{
AddEntityCollideCallback("Player" , "blood" , "bloodscare" , true, 0);
}
}

and the voidfunctions:
////////////////////////////
// Actual functions

void bloodscare(string &in asParent, string &in asChild, int alState)
{
    PlaySoundAtEntity("", "scare_animal_squeal.snt", "Player", 0.0f, false);
    AddDebugMessage("Sound Trigger Activated.", false);
}

I'm not really sure why it doesn't trigger. If someone could alternatively tell me how to make script_area's trigger events that would be nice too. Any help is appreciated.
12-24-2010, 02:38 AM
Find


Messages In This Thread
"AddEntityCollideCallback" issue - by Nitrowing - 12-24-2010, 02:38 AM
RE: "AddEntityCollideCallback" issue - by Dark88 - 12-24-2010, 03:08 AM
RE: "AddEntityCollideCallback" issue - by Dark88 - 12-24-2010, 03:15 AM



Users browsing this thread: 1 Guest(s)