RE: Total Conversion: "Sciophobia"
What wrong with my script? sorry for writing in this forum but i got no clue how to make my own
here it is :
void OnStart()
{
AddEntityCollideCallback("Player", "FlyingJesus_2", "HolyJesus", true, 1);
AddEntityCollideCallback("Jesus_2", "FlyingJesus_2", "Sound", true, 1);
}
void HolyJesus(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Jesus_2", true);
AddPropForce("Jesus_2", 0, 0, 30000, "World");
}
void Sound(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "21_screams.snt", "FlyingJesus_1", 0, false);
}
AddUseItemCallback("", "key_study_11", "leveldoor", "CrowbarKeyOnDoor", true);
}
void CrowbarKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("leveldoor", false, true);
PlaySoundAtEntity("", "unlock_door.ogg", "leveldoor", 0, false);
RemoveItem("key_study_11");
}
////////////////////////////
// Run when entering map
void OnEnter()
{
AddUseItemCallback("", "key_study_10", "Basementdoor", "KeyOnDoor", true);
}
void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Basementdoor", false, true);
PlaySoundAtEntity("", "unlock_door.ogg", "Basementdoor", 0, false);
RemoveItem("key_study_10");
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}
|