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 won´t work ^^
Artyom Offline
Senior Member

Posts: 370
Threads: 27
Joined: Jul 2012
Reputation: 11
#1
Script won´t work ^^

Why won´t this amb work? i´ve tried with different ambs and that works just fine ^^ i´ve tried with both .snt and .ogg but it just don´t seem to work, please help me...
void OnStart ()
{
AddEntityCollideCallback("Player", "kitchen_music", "start_music_dungeon1", true, 1);
}
void start_music_dungeon1(string &in asParent, string &in asChild, int alState)
{
if(alState == 1)
{
StopMusic(3, 1);
PlayMusic("21_amb", true, 0.7, 3, 0, false);
}
}

- Inactive account -
07-20-2012, 12:47 AM
Find
Ongka Offline
Member

Posts: 225
Threads: 3
Joined: Nov 2010
Reputation: 20
#2
RE: Script won´t work ^^

remove the if statement and add .ogg to the music file.
void OnStart ()
{
AddEntityCollideCallback("Player", "kitchen_music", "start_music_dungeon1", true, 1);
}

void start_music_dungeon1(string &in asParent, string &in asChild, int alState)
{
StopMusic(3, 1);
PlayMusic("21_amb.ogg", true, 0.7, 3, 0, false);
}

[Image: 18694.png]
(This post was last modified: 07-20-2012, 01:54 AM by Ongka.)
07-20-2012, 01:54 AM
Find
Artyom Offline
Senior Member

Posts: 370
Threads: 27
Joined: Jul 2012
Reputation: 11
#3
RE: Script won´t work ^^

(07-20-2012, 01:54 AM)Ongka Wrote: remove the if statement and add .ogg to the music file.

void OnStart ()

{

AddEntityCollideCallback("Player", "kitchen_music", "start_music_dungeon1", true, 1);

}



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

{

StopMusic(3, 1);

PlayMusic("21_amb.ogg", true, 0.7, 3, 0, false);

}



still wont work...

- Inactive account -
07-24-2012, 07:26 PM
Find
Steve Offline
Member

Posts: 178
Threads: 17
Joined: Jun 2012
Reputation: 7
#4
RE: Script won´t work ^^

I have no idea just a total wild guess (may be retarded) but change the 0 to 0.1 or something.

CURRENTLY WORKING ON:
Final Light = 40%
Need of voice actors.
07-24-2012, 07:52 PM
Find
drunkmonk Offline
Member

Posts: 109
Threads: 7
Joined: Jun 2012
Reputation: 4
#5
RE: Script won´t work ^^

Try changing the false at the end of your play music to true, see if that does anything
07-24-2012, 08:52 PM
Find
Artyom Offline
Senior Member

Posts: 370
Threads: 27
Joined: Jul 2012
Reputation: 11
#6
RE: Script won´t work ^^

this is really strange, it won't work. Could you guys try it out and maybe post you're solution?

- Inactive account -
07-25-2012, 01:31 AM
Find
drunkmonk Offline
Member

Posts: 109
Threads: 7
Joined: Jun 2012
Reputation: 4
#7
RE: Script won´t work ^^

Does the priority of the StopMusic match with the PlayMusic from the previous map?
07-25-2012, 01:38 AM
Find
Artyom Offline
Senior Member

Posts: 370
Threads: 27
Joined: Jul 2012
Reputation: 11
#8
RE: Script won´t work ^^

(07-25-2012, 01:38 AM)drunkmonk Wrote: Does the priority of the StopMusic match with the PlayMusic from the previous map?
well what the problem is, is that it won't work with that specific sound file. Let's say i switch the 21_amb to 01_amb_darkness and it will work just fine, it's strange isn't it...

- Inactive account -
07-26-2012, 11:33 AM
Find




Users browsing this thread: 4 Guest(s)