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
Script Help Music Help
RedSampson00 Offline
Junior Member

Posts: 11
Threads: 4
Joined: Nov 2012
Reputation: 0
#1
Music Help

I have been having problems with my script. I used a Youtube tutorial to get my first music file working. After that, I tried to do it by myself. Didn't work out very well Sad.
Music_2 is the music file not working. I get an error saying the signatures don't match on lines 5, 142 or something like that. You'll find the rest of the script for the Music_2 file after all the pathnode spam. Thanks in advance.

void OnStart()
{
AddEntityCollideCallback("Player", "PlayerCollide", "MonsterFunction", true, 1);
AddEntityCollideCallback("Player", "Music", "StartMusic", true, 1);
AddEntityCollideCallback("Player", "Music_2", "StartMusic_2", true, 1);
AddUseItemCallback("", "key_1", "lockdoor_1", "UsedKeyOnDoor", true);
AddEntityCollideCallback("Player", "PlayerCollide_2", "ArmourFunc", true, 1);
}
void MonsterFunction(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 2, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_5", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_6", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_7", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_8", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_9", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_10", 4, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_11", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_12", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_13", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_14", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_15", 4, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_16", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_17", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_18", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_19", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_20", 4, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_21", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_22", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_23", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_24", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_34", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_35", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_36", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_37", 4, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_38", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_39", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_40", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_39", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_38", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_37", 4, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_36", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_35", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_34", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_24", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_23", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_22", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_21", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_20", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_19", 4, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_18", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_17", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_16", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_15", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_14", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_13", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_12", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_11", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_10", 4, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_9", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_8", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_7", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_6", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_5", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_5", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_6", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_7", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_8", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_9", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_10", 4, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_11", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_12", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_13", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_14", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_15", 4, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_16", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_17", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_18", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_19", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_20", 4, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_21", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_22", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_23", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_24", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_34", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_35", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_36", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_37", 4, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_38", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_39", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_40", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_39", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_38", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_37", 4, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_36", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_35", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_34", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_24", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_23", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_22", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_21", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_20", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_19", 4, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_18", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_17", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_16", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_15", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_14", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_13", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_12", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_11", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_10", 4, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_9", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_8", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_7", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_6", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_5", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 0, "");
}

void StartMusic(string &in asParent, string &in asChild, int alState)
{
PlayMusic ("Music1", true, 0.8, 2, 1, true);
}

void StartMusic_2(string &in asParent, string &in asChild, int alState)
{
PlayMusic ("enemy_hallucination_disappear", 0.8, 2, 1, true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("lockdoor_1", false, true);
PlaySoundAtEntity("", "unlock_door", "lockdoor_1", 0, false);
RemoveItem("key_1");
}

void ArmourFunc(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("armour_1", true);
}
(This post was last modified: 11-18-2012, 02:04 PM by RedSampson00.)
11-18-2012, 01:28 PM
Find


Messages In This Thread
Music Help - by RedSampson00 - 11-18-2012, 01:28 PM
RE: Music Help - by FlawlessHappiness - 11-18-2012, 02:49 PM
RE: Music Help - by RedSampson00 - 11-18-2012, 03:04 PM
RE: Music Help - by Steve - 11-18-2012, 03:28 PM
RE: Music Help - by RedSampson00 - 11-18-2012, 03:38 PM
RE: Music Help - by FlawlessHappiness - 11-18-2012, 04:05 PM
RE: Music Help - by RedSampson00 - 11-18-2012, 04:07 PM
RE: Music Help - by GoranGaming - 11-18-2012, 07:32 PM



Users browsing this thread: 2 Guest(s)