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 which signature shall i have on "PlayMusic" pls help
RumpNissen Offline
Junior Member

Posts: 1
Threads: 1
Joined: Mar 2012
Reputation: 0
#1
which signature shall i have on "PlayMusic" pls help

i am new to scripting. so i tried to solve this by my own but i couldn't. so i thought other eyes and those who have more experience could help me out. Here is my script


void OnStart()
{
AddEntityCollideCallback("Player", "FlyingJesus_1", "HolyJesus", true, 1);
AddEntityCollideCallback("Jesus_1", "FlyingJesus_1", "Sound", true, 1);
AddEntityCollideCallback("Player", "Hanging", "Hang", true,1);
AddEntityCollideCallback("Hagingman", "Hanging", "Soound", true, 1);
AddEntityCollideCallback("Player", "Music", "StartMusic", true, 1);
}

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

void HolyJesus(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Jesus_1", true);
AddPropForce("Jesus_1", 0, 0, 0, "World");
}

void Sound(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "24_iron_maiden.snt", "FlyingJesus_1", 0, false);
}

void Hang(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Hagingman", true);
}

void Soound(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "24_iron_maiden.snt", "Hanging", true, 1);
}

void OnLeave()
{
}
03-07-2012, 12:35 AM
Find
Linus Ågren Offline
Senior Member

Posts: 309
Threads: 58
Joined: Jan 2011
Reputation: 5
#2
RE: which signature shall i have on "PlayMusic" pls help

Isn't general_rain.ogg in the "sounds" folder? In that case, use PlaySoundAtEntity.

Creator of The Dark Treasure.
03-07-2012, 08:13 AM
Website Find




Users browsing this thread: 1 Guest(s)