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
Texture, Model & Animation Help Music "Lower" if player enters area
Amnesiaplayer Offline
Senior Member

Posts: 539
Threads: 105
Joined: Jun 2014
Reputation: 0
#7
RE: Music "Lower" if player enters area

(10-06-2015, 08:09 PM)FlawlessHappiness Wrote: The last number in the AddEntityCollideCallback, int alStates.

PHP Code: (Select All)
AddEntityCollideCallback(stringasParentNamestringasChildNamestringasFunctionbool abDeleteOnCollideint alStates); 

If you set it to 0, the callback calls both when entering and when leaving the area.
PHP Code: (Select All)
AddEntityCollideCallback("Player""Area""Function"false0); 

In your function you would then do:

PHP Code: (Select All)
void Function(string &in asParentstring &in asChildint alState)
{
if(
alState == 1//If entering
{
//Do stuff if entering
}

if(
alState == -1//If leaving
{
//Do stuff if leaving the area
}


Thanks!! Now this is solved, I tried it, and it worked, now I can upgrade more old scriptings haha.
But now about the music, is there something wrong with my snt file?! since it doesn't change from volumes or doesn't "fade" to a lower volume...
10-07-2015, 12:52 PM
Find


Messages In This Thread
RE: Music "Lower" if player enters area - by Amnesiaplayer - 10-07-2015, 12:52 PM



Users browsing this thread: 1 Guest(s)