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
Area Problems
house Offline
Member

Posts: 195
Threads: 11
Joined: Oct 2010
Reputation: 1
#1
Area Problems

Something wrong with my areas. They won't do what they are supposed to do. :( I really need them to do what they do. Can anyone find out why they won't work? The ones that don't work are a area that triggers a monster and the area that triggers the player to teleport. Theres two areas that teleport you. Those are the only ones not working. Plus, they are the only ones not working. This is whats in the .hps file of my map:

void OnStart()
{
    AddUseItemCallback("UnlockDoor", "key_study_1", "mansion_1", "UsedKeyOnDoor", false);
    
    AutoSave();
    
    GiveHint("", "Messages", "Hint_3", 4.5f);
    
    AddQuest("Door02", "Door02");
    
    SetMapDisplayNameEntry("Hallway");
    
    SetDeathHint("Messages", "Death_Hint_1");
    
    AddQuest("Door02", "Door02");
    
    PlayMusic("18_amb.ogg", false, 0.7f, 0, 10, false);
    
    AddEntityCollideCallback("Player", "SlimeAreaActive_1", "CollideSlimeActive", true, 1);
    AddEntityCollideCallback("Player", "Servent_Active_1", "CollideGruntActive", true, 1);
    AddEntityCollideCallback("servent_grunt_1", "AreaGruntDeactivate", "CollideGruntDeactivate", true, 1);
    AddEntityCollideCallback("Player", "AreaPlayerTeleport", "CollidePlayerTeleport", true, 1);
    AddEntityCollideCallback("Player", "AreaPlayerTeleport_2", "CollidePlayerTeleport2", true, 1);
}

void CollideGruntDeactivate(string &in asParent, string &in asChild, int alState)
{
        SetEntityActive("servent_grunt_1", false);
        
        SetDeathHint("Messages", "Death_Hint_1");
        
        PlayMusic("18_amb.ogg", false, 0.7f, 0, 10, false);
}

void CollidePlayerTeleport(string &in asParent, string &in asChild, int alState)
{
   TeleportPlayer("PlayerStartArea_2");
   FadeOut(0);
   FadeIn(20);
   SetMessage("Messages", "Player_1", 5.0f);
   AddDebugMessage("Teleporting!", false);
}

void CollidePlayerTeleport2(string &in asParent, string &in asChild, int alState)
{
   TeleportPlayer("PlayerStartArea_3");
   FadeOut(0);
   FadeIn(20);
   AddDebugMessage("Home? NOOO!", false);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
    SetSwingDoorLocked("mansion_1", false, true);
    
    PlaySoundAtEntity("", "unlock_door", "mansion_1", 0, false);
    RemoveItem("key_study_1");
    AutoSave();
    PlayMusic("04_puzzle_acid.ogg", false, 0.7f, 0, 10, false);
    GiveSanityBoostSmall();
    CompleteQuest("Door02", "Door02");
    AddDebugMessage("Key Used on door Success.", false);
}

void InteractLockedDoor(string &in asEntity)
{
    SetMessage("Messages", "Door_Locked_9", 0);
    
    PlayGuiSound("locked_door.snt", 0.8f);
    
    AddTimer("castle_1", 1.0f, "TimerDoorMessageOnAgain");
    
    AddDebugMessage("Stupid Door!", false);
}

void TimerDoorMessageOnAgain(string &in asTimer)
{
    SetEntityPlayerInteractCallback("castle_1", "InteractLockedDoor", true);
}

void CollideSlimeActive()
{
    PlaySoundAtEntity("slime", "slime/slime_create1.ogg", "Player", 0, false);
    AutoSave();
}

void CollideGruntActive()
{
    PlayMusic("10_event_coming.ogg", false, 1, 0.1, 10, false);

    PlaySoundAtEntity("grunt","grunt/amb_idle.snt", "mansion_2", 3, false);
    AddDebugMessage("MONSTER!", false);
    SetPlayerSanity(40.0f);
    AutoSave();
    SetEntityActive("servent_grunt_1", true);
    SetDeathHint("Messages", "Death_Hint_2");
    ClearEnemyPatrolNodes("servent_grunt_1");
    AddEnemyPatrolNode("servent_grunt_1", "PathNodeArea_21", 5, "");
    AddEnemyPatrolNode("servent_grunt_1", "PathNodeArea_32", 1, "");
    AddEnemyPatrolNode("servent_grunt_1", "PathNodeArea_35", 1, "");
    AddEnemyPatrolNode("servent_grunt_1", "PathNodeArea_41", 2, "");
    AddEnemyPatrolNode("servent_grunt_1", "PathNodeArea_40", 4, "");
    AddEnemyPatrolNode("servent_grunt_1", "PathNodeArea_50", 1, "");
    AddEnemyPatrolNode("servent_grunt_1", "PathNodeArea_54", 1, "");
    AddEnemyPatrolNode("servent_grunt_1", "PathNodeArea_56", 0, "");
}

////////////////////////////
// Run when entering map
void OnEnter()
{
    SetupLoadScreen("LoadingText", "2_level_loading", 5, "game_loading_alexander.jpg");
}

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

}
10-16-2010, 09:49 PM
Find


Messages In This Thread
Area Problems - by house - 10-16-2010, 09:49 PM
RE: FALAL ERROR: Unexpected end of line - by Luis - 10-17-2010, 06:02 PM
RE: Area Problems - by Luis - 10-18-2010, 04:48 PM
RE: Area Problems - by house - 10-18-2010, 06:28 PM



Users browsing this thread: 1 Guest(s)