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
Script Help Error with sound script
Neelke Offline
Senior Member

Posts: 668
Threads: 82
Joined: Apr 2013
Reputation: 26
#3
RE: Error with sound script

Youve used the function completely wrong.

void ScarySound1(string& asSoundName, string& asSoundFile, string& asEntity, float afFadeTime, bool abSaveSound);

This doesn't have the proper setup and it also shouldn't have the ; in the end. To setup a collide function, you need three parameters:

void ScarySound1(string &in asParent, string &in asChild, int alState)

asParent = the main object colliding with asChild (in your case its the Player)
asChild = the object asParent is meant to collide with ("sound01")
alState = checking whether player is colliding with asChild or leaving the area (0 = check if player is both leaving and entering the area, 1 = check if player is entering area, -1 check if player is leaving area)

Derp.
03-13-2015, 10:33 PM
Find


Messages In This Thread
Error with sound script - by MaksoPL - 03-13-2015, 09:47 PM
RE: Error with sound script - by Darkfire - 03-13-2015, 10:30 PM
RE: Error with sound script - by Neelke - 03-13-2015, 10:33 PM



Users browsing this thread: 1 Guest(s)