RE: Error Unexpected End of File
So, I'm back! This time there are no errors but something ins't working and I'm wondering if I forgot one line in the scripting or something. So, I have a level door that's locked and you have to go through another level door to get the key, so when you return to the original place to unlock the door, you use the key and it makes the unlocking noise, gets rid of the key, but the door is still locked! I'm just wondering if I messed up a script or something, I have the .hps into the first room where the locked door is, It looks like this.
_______________________________________________________________________________________
// Run first time starting map
void OnStart()
{
AddEntityCollideCallback("Player", "SoundArea_1", "Sound_1", true, 1);
AddEntityCollideCallback("Player", "fallarea", "fall", true, 1);
AddEntityCollideCallback("Player", "SoundArea_2", "Sound_2", true, 1);
AddEntityCollideCallback("Player", "SoundArea_3", "Sound_3", true, 1);
AddUseItemCallback("", "Stairs_Key", "Stairs_Downstairs", "UsedKeyonDoor", true);
}
void fall(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("2", true);
SetEntityActive("3", true);
SetEntityActive("4", true);
SetEntityActive("5", true);
SetEntityActive("6", true);
}
void Sound_1(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "react_breath1.ogg", "Player", 0, false);
}
void UsedKeyonDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Stairs_Downstairs", false, true);
PlaySoundAtEntity("", "unlock_door", "Stairs_Downstairs", 0, false);
RemoveItem("Stairs_Key");
}
void Sound_2(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "general_thunder1.ogg", "Player", 0, false);
}
void Sound_3(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "amb_idle_whimp01.ogg", "Player", 0, false);
}
_______________________________________________________________________________________
I think I'm missing a line of script. Aren't I? Please find the problem if you can.
(New At Scripting)
~Skyrimdude111
N00B
|