Neelke
Senior Member
Posts: 668
Threads: 82
Joined: Apr 2013
Reputation:
26
|
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 |
|