The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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
Door/Script Area not working
GhastDagger Offline
Junior Member

Posts: 9
Threads: 3
Joined: Sep 2011
Reputation: 0
#1
Sad  Door/Script Area not working

Hey guys, the title says it all.. the specific key for the work doesn't work and it says "Cannot use this item this way" or something when i use it on the door, and the script area are supposed to spawn monsters but when i walk on the area it doesn't work..so what's possibly wrong with the scripts ? and sorry for my too many questions Confused

here's the HPS file:



////////////////////////////
// Run first time starting map
void OnStart()
{
AddUseItemCallback("", "lolkey_1", "level_orb_room_door_1", "KeyOnDoor", true);
AddEntityCollideCallback("Player", "DoorScare", "DoorScare", true, 1);
AddEntityCollideCallback("Player", "HorrorStart", "CollideHorrorStart", false, 1);

}


void KeyOndoor(string &in asItem, string &in asEntity)
{
SetLevelDoorLocked("level_orb_room_door_1", false);
PlaySoundAtEntity("", "unlock_door", "level_orb_room_door_1", 0, false);
RemoveItem("lolkey_1");
}


void DoorScare(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("TrapzDoor", true, true);
SetSwingDoorLocked("TrapzDoor", true, true);
PlaySoundAtEntity("", "Close_Door.snt", "TrapzDoor", 0.0f, true);
GiveSanityDamage(10, true);
}


void HorrorStart(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "screams", "Player", 0, false);
GiveSanityDamage(10, true);
SetEntityActive("enemy_suitor_alois_1", true);
SetEntityActive("Servant_grunt_1", true);
SetEntityActive("Servant_brute_1", true);
ShowEnemyPlayerPosition("enemy_suitor_alois_1");
}


void OnPickUp(string &in asEntity, string &in type)
{
SetEntityActive("Corpsy", true);
PlaySoundAtEntity("", "screams", "Player", 0, false);
GiveSanityDamage(10, true);
PlaySoundAtEntity("alois_notice_long", "alois_notice_long.snt", "Player", 0, false);
}


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


}

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


}
10-17-2011, 05:13 PM
Find


Messages In This Thread
Door/Script Area not working - by GhastDagger - 10-17-2011, 05:13 PM
RE: Door/Script Area not working - by Darion97 - 10-17-2011, 05:22 PM
RE: Door/Script Area not working - by schmupper - 10-17-2011, 05:29 PM
RE: Door/Script Area not working - by Darion97 - 10-17-2011, 05:39 PM
RE: Door/Script Area not working - by GhastDagger - 10-17-2011, 07:42 PM
RE: Door/Script Area not working - by flamez3 - 10-18-2011, 01:23 PM



Users browsing this thread: 1 Guest(s)