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
problems with sound script (solved)
Nice Offline
Posting Freak

Posts: 3,812
Threads: 37
Joined: Jan 2012
Reputation: 153
#1
problems with sound script (solved)

Hello all i've started with map editing in scripting yesterday so i'm a 100% beginner. Anyway i've manage to add 2 succesfull scripts so far (that work as intended). One that door closes behind me and one for unlocking the door with a key..

Now i decided to make a sound one.. ( If a player steps into area he hears a sound). I've tried messing around a bit with the script but i cant get it to work. Whenever i run my CS the game crashes with a fatal error. Heres my sound script :

{
AddEntityCollideCallback("player", "Music_1", "start", true, 1);
}

void start(string &in asParent, string &in AsChild, int alState)
{
PlaySoundAtEntity("", "amb_idle03.ogg", "Player", 0, false);
}

So can you tell me what i did wrong ? Smile And i know the mistake is probably obvious and i did all horribly wrong but cut me some slack, i've only just begun with map making/scripting yesterday Smile


Sorry but we cannot change your avatar as the new avatar you specified is too big. The maximum dimensions are 80x80 (width x height)
(This post was last modified: 05-20-2012, 10:30 PM by Nice.)
05-20-2012, 09:27 PM
Find


Messages In This Thread
problems with sound script (solved) - by Nice - 05-20-2012, 09:27 PM
RE: problems with sound script - by SilentStriker - 05-20-2012, 09:37 PM
RE: problems with sound script - by Nice - 05-20-2012, 09:44 PM
RE: problems with sound script - by SilentStriker - 05-20-2012, 09:50 PM
RE: problems with sound script - by Nice - 05-20-2012, 09:52 PM
RE: problems with sound script - by SilentStriker - 05-20-2012, 10:03 PM
RE: problems with sound script - by Nice - 05-20-2012, 10:05 PM
RE: problems with sound script - by SilentStriker - 05-21-2012, 06:45 AM
RE: problems with sound script - by Adny - 05-20-2012, 10:23 PM



Users browsing this thread: 1 Guest(s)