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


Thread Rating:
  • 2 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Hard to find the errors in the HPS file
robinnjensen Offline
Junior Member

Posts: 5
Threads: 1
Joined: Mar 2012
Reputation: 0
#13
RE: Hard to find the errors in the HPS file

I'll try them out, i'll tell how it went ! Smile
Here is how i editet my script from you guys,


////////////////////////////
//run when entering map
void OnStart()
{
AddUseItemCallback("", "key_study_1", "Freedom", "KeyOnDoor", true);
AddEntityCollideCallback("Player", "PlayerCollide", "MonsterFunction", true, 1);
}

void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Freedom", false, true);
PlaySoundAtEntity("", "unlock_door", "Freedom ", 0, false);
RemoveItem("key_study_1");
}


void MonsterFunction(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_brute_2", true);
SetEntityPlayerInteractCallback("cabinetmetal", "Spawn", true);

}



void Spawn(string &in asEntity)
{


SetEntityActive("corpse_male_1", true);


AddTimer("Scare", 0.5f, "Scare1");
}


void scare1(string &in asTimer)
{
GiveSanityDamage(10, true);
PlaySoundAtEntity("", "react_scare.snt", "Player", 0, false);
}



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


////////////////////////////
// Run when leaving map
void OnLeave()
}
void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Freedom", false, true);
PlaySoundAtEntity("", "unlock_door", "
Freedom ", 0, false);
RemoveItem("key_study_1");
}


void MonsterFunction(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_brute_2", true);
SetEntityPlayerInteractCallback("cabinetmetal", "Spawn", true);

}


{
SetEntityActive("corpse_male_1", true);
AddTimer("Scare", 0.5f, "Scare1");
}

void scare1(string &in asTimer)
{
GiveSanityDamage(10, true);
PlaySoundAtEntity("", "react_scare.snt", "Player", 0, false);
}



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


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










---------------------------
FATAL ERROR
---------------------------
FATAL ERROR: Could not load script file 'custom_stories/Robin's Hell/custom_stories/Robin's Hell/maps/Robin's Hell.hps'!
 main (54, 1) : ERR  : Expected ',' or ';'




---------------------------
OK   
---------------------------



This is so wierd Sad
(This post was last modified: 03-05-2012, 09:08 PM by robinnjensen.)
03-05-2012, 08:48 PM
Find


Messages In This Thread
RE: Hard to find the errors in the HPS file - by robinnjensen - 03-05-2012, 08:48 PM



Users browsing this thread: 1 Guest(s)