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
Unexpected End Of File? HELP ME
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#4
RE: Unexpected End Of File? HELP ME

(10-23-2011, 02:38 PM)Lemorz56 Wrote: HERE IS A BETTER VERSION
-----------------------------------------------------------------------------------------


void OnStart()
{
AddUseItemCallback("", "monsterdoorkey", "monsterdoor", "UsedKeyOnDoor", true);
AddEntityCollideCallback("Player", "ScriptArea_1", "PianoScare", false, 0);
AddEntityCollideCallback("Player", "ScriptArea_2", "PianoStop", false, 0);
}



void PianoScare(string &in asParent, string &in asChild, int alState)
{

if(alState == 1)
{

PlaySoundAtEntity("PianoScareMusic", "general_piano03.ogg", "piano_1", 0, false);
}
if(alState == -1)
{
StopSound("general_piano03.ogg", 5);
}
}

void pianotimer(string &in asTimer)
{
PlaySoundAtEntity("PianoScareMusic", "general_piano03.ogg", "piano_1", 0, false);
AddTimer("pianotimer", 18, "pianotimer");
}

void PianoStop(string &in asParent, string &in asChild, int alState)
{
StopSound("PianoScareMusic", 0);
RemoveTimer("pianotimer");
SetLeverStuckState("piano_01, 0, true);
AddPropImpulse("piano_01", 0, 0, 100, "World");
PlaySoundAtEntity("PianoScareBoom", "break_wood", "piano_1", 0, false);
CreateParticleSystemAtEntity("", "ps_dust_impact.ps", "impact", false);
}



void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("monsterdoor", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "monsterdoor", 0.0f, false);
RemoveItem("monsterdoorkey");
}
The bold text means that you haven't closed your functions properly.


void OnStart()
{
AddUseItemCallback("", "monsterdoorkey", "monsterdoor", "UsedKeyOnDoor", true);
AddEntityCollideCallback("Player", "ScriptArea_1", "PianoScare", false, 0);
AddEntityCollideCallback("Player", "ScriptArea_2", "PianoStop", false, 0);
}



void PianoScare(string &in asParent, string &in asChild, int alState)
{
if(alState == 1)
}

PlaySoundAtEntity("PianoScareMusic", "general_piano03.ogg", "piano_1", 0, false);
{
if(alState == -1)
StopSound("general_piano03.ogg", 5);
}


void pianotimer(string &in asTimer)
{
PlaySoundAtEntity("PianoScareMusic", "general_piano03.ogg", "piano_1", 0, false);
AddTimer("pianotimer", 18, "pianotimer");
}

void PianoStop(string &in asParent, string &in asChild, int alState)
{
StopSound("PianoScareMusic", 0);
RemoveTimer("pianotimer");
SetLeverStuckState("piano_01, 0, true);
AddPropImpulse("piano_01", 0, 0, 100, "World");
PlaySoundAtEntity("PianoScareBoom", "break_wood", "piano_1", 0, false);
CreateParticleSystemAtEntity("", "ps_dust_impact.ps", "impact", false);
}



void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("monsterdoor", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "monsterdoor", 0.0f, false);
RemoveItem("monsterdoorkey");
}

10-23-2011, 02:48 PM
Find


Messages In This Thread
Unexpected End Of File? HELP ME - by Lemorz56 - 10-23-2011, 02:27 PM
RE: Unexpected End Of File? HELP ME - by flamez3 - 10-23-2011, 02:34 PM
RE: Unexpected End Of File? HELP ME - by Lemorz56 - 10-23-2011, 02:38 PM
RE: Unexpected End Of File? HELP ME - by flamez3 - 10-23-2011, 02:48 PM
RE: Unexpected End Of File? HELP ME - by Lemorz56 - 10-23-2011, 02:51 PM
RE: Unexpected End Of File? HELP ME - by flamez3 - 10-23-2011, 02:56 PM
RE: Unexpected End Of File? HELP ME - by Lemorz56 - 10-23-2011, 03:00 PM
RE: Unexpected End Of File? HELP ME - by flamez3 - 10-23-2011, 03:07 PM
RE: Unexpected End Of File? HELP ME - by Lemorz56 - 10-23-2011, 03:13 PM
RE: Unexpected End Of File? HELP ME - by Elven - 10-23-2011, 03:10 PM
RE: Unexpected End Of File? HELP ME - by flamez3 - 10-23-2011, 03:14 PM
RE: Unexpected End Of File? HELP ME - by Lemorz56 - 10-23-2011, 03:20 PM
RE: Unexpected End Of File? HELP ME - by flamez3 - 10-23-2011, 03:26 PM
RE: Unexpected End Of File? HELP ME - by Lemorz56 - 10-23-2011, 03:30 PM
RE: Unexpected End Of File? HELP ME - by Elven - 10-23-2011, 03:40 PM



Users browsing this thread: 1 Guest(s)