Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
HOW TO PLAY MUSIC??? ANOTHER ISSUE >:(
Roenlond Offline
Senior Member

Posts: 331
Threads: 3
Joined: Apr 2011
Reputation: 0
#8
RE: How to play music???

(05-01-2011, 05:02 PM)waqas12346 Wrote: Did I made aNY mistake(S)??? Sad

Quote:void OnEnter()
{
PlayMusic("17_amb.ogg", true, 1.0f, 0, 0, true);
}

{
AddEntityCollideCallback("Player", "ScriptArea_1", "Function01", true, 1);
}
void Function01(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Monster", true);
AddEnemyPatrolNode("Monster", "PathNodeArea_1", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_5", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_6", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_7", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_8", 0, "");

PlayMusic("10_event_coming", false, 1.0f, 0, 0, true);

AddUseItemCallback("", "key_study_1", "level_orb_room_door_1", "KeyOnDoor", true);
PlaySoundAtEntity("", "unlock_door.snt", "mansion_1", 0.0f, true);
}

Yes, the {
AddEntityCollideCallback("Player", "ScriptArea_1", "Function01", true, 1);
} has no function, i.e void, it's best to start those in the "void OnStart()."

Here, try this:

void OnStart()
{
PlayMusic("17_amb.ogg", true, 1.0f, 0, 0, true);
AddEntityCollideCallback("Player", "ScriptArea_1", "Function01", true, 1);
}

void Function01(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Monster", true);
AddEnemyPatrolNode("Monster", "PathNodeArea_1", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_5", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_6", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_7", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_8", 0, "");
PlayMusic("10_event_coming", false, 1.0f, 0, 0, true);
AddUseItemCallback("", "key_study_1", "level_orb_room_door_1", "KeyOnDoor", true);
PlaySoundAtEntity("", "unlock_door.snt", "mansion_1", 0.0f, true);
}

/////////////
////////////////////////////
// Run when entering map
void OnEnter()
{

}

////////////////////////////
// Run when leaving map
void OnLeave()
{
}

Tell me if you're getting any error Smile
05-01-2011, 05:19 PM
Find


Messages In This Thread
RE: How to play music??? - by Ongka - 05-01-2011, 12:30 PM
RE: How to play music??? - by HumiliatioN - 05-01-2011, 01:12 PM
RE: How to play music??? - by Roenlond - 05-01-2011, 01:41 PM
RE: How to play music??? - by HumiliatioN - 05-01-2011, 03:46 PM
RE: How to play music??? - by Roenlond - 05-01-2011, 04:16 PM
RE: How to play music??? - by waqas12346 - 05-01-2011, 05:02 PM
RE: How to play music??? - by Roenlond - 05-01-2011, 05:19 PM



Users browsing this thread: 1 Guest(s)