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
Fadein help
eagledude4 Offline
Member

Posts: 144
Threads: 14
Joined: Dec 2011
Reputation: 0
#19
RE: Timer help

(01-05-2012, 02:21 AM)Statyk Wrote: It looks correct. Are you saving in the correct .hps?... Could you perhaps post all of your .hps? If everything seems fine, I don't understand what the issue could be.
I'm only using one .hps file.

void OnStart() {
    if (ScriptDebugOn()) {
        GiveItemFromFile("lantern", "lantern.ent");
        for(int i=0;i<10;i++) GiveItemFromFile("tinderbox_"+i, "tinderbox.ent");
        /*SetEntityActive("invisWall", false);
        SetEntityActive("blockArea", false);*/
    }
    SetPlayerActive(false);
    FadeIn(5);
    AddTimer("FadeTimer", 5, "StartGame");
    AddNote("First", "");
    AddEntityCollideCallback("Player", "EnemyTriggerArea", "EnteredEnemyTriggerArea", true, 1);
    AddEntityCollideCallback("Player", "BlockArea", "EnteredBlockArea", true, 1);
    SetEntityPlayerInteractCallback("chest_small_2", "TriggerSpider", true);
    SetEntityCallbackFunc("key_1", "OnPickup");
    PlaySoundAtEntity("big_clock_chime", "big_clock_chime.snt", "clock_grandfather_1", 0, false);
    SetDeathHint("Death", "StairScare");
}

void OnEnter() {
}

void OnLeave() {
}

void StartGame(string &in asTimer) {
    SetPlayerActive(true);
}
    
void EnteredEnemyTriggerArea(string &in asParent, string &in asChild, int alState) {
    SetEntityActive("servant_grunt_1", true);
    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 0, "");
    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "");
    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 0, "");
    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_4", 0, "");
    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_5", 0, "");
    if(GetEntitiesCollide("Player", "SonRoomArea") == true) {
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_6", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_7", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_8", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_9", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_10", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_11", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_12", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_13", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_14", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_15", 8, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_14", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_13", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_12", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_11", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_10", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_9", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_8", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_7", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_6", 0, "");
    } else if(GetEntitiesCollide("Player", "DadRoomArea") == true) {
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_16", 8, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_17", 8, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_18", 8, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_19", 8, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_20", 8, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_21", 8, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_22", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_23", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_24", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_25", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_26", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_27", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_28", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_29", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_30", 8, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_29", 8, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_28", 8, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_27", 8, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_26", 8, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_25", 8, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_24", 8, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_23", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_22", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_21", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_19", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_18", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_17", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_16", 0, "");
    }
    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_5", 0, "");
    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_4", 0, "");
    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 0, "");
    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "");
    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 0, "");
    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_31", 0, "");
}

void EnteredBlockArea(string &in asParent, string &in asChild, int alState) {
    if (HasItem("key_1") == false) {
        SetMessage("PersonalMessages", "Barrier", 6);
    }
}

void OnPickup(string &in asEntity, string &in type) {
    SetEntityActive("invisWall", false);
    SetEntityActive("blockArea", false);
}

void TriggerSpider(string &in asEntity) {
    SetEntityActive("spider_1", true);
}

lang:
<LANGUAGE>
    <CATEGORY Name="CustomStoryMain">
        <Entry Name="Description">You are awoken by the chimes of a grandfather clock.</Entry>
    </CATEGORY>

    <CATEGORY Name="PersonalMessages">
        <Entry Name="Barrier">I should investigate my father's room before heading downstairs.</Entry>
    </CATEGORY>

    <CATEGORY Name="Death">
        <Entry Name="StairScare">Wardrobes make good hiding places.</Entry>
    </CATEGORY>
    
    <CATEGORY Name="Journal">
        <Entry Name="First">See what's up.</Entry>
    </CATEGORY>
</LANGUAGE>

I have skype, so remote assistance is a possibility if you do as well.

Its hard to see the truth when you've been blinded by lies.
(This post was last modified: 01-05-2012, 02:25 AM by eagledude4.)
01-05-2012, 02:25 AM
Find


Messages In This Thread
Fadein help - by eagledude4 - 01-02-2012, 06:03 PM
RE: Timer help - by Statyk - 01-02-2012, 06:16 PM
RE: Timer help - by Your Computer - 01-02-2012, 08:38 PM
RE: Timer help - by eagledude4 - 01-02-2012, 11:09 PM
RE: Timer help - by eagledude4 - 01-03-2012, 12:39 AM
RE: Timer help - by Your Computer - 01-03-2012, 02:37 AM
RE: Timer help - by Statyk - 01-03-2012, 02:08 AM
RE: Timer help - by eagledude4 - 01-03-2012, 03:55 AM
RE: Timer help - by Statyk - 01-03-2012, 04:01 AM
RE: Timer help - by eagledude4 - 01-03-2012, 04:04 AM
RE: Timer help - by Statyk - 01-03-2012, 04:16 AM
RE: Timer help - by eagledude4 - 01-03-2012, 05:34 AM
RE: Timer help - by Statyk - 01-03-2012, 09:16 PM
RE: Timer help - by eagledude4 - 01-05-2012, 12:59 AM
RE: Timer help - by Your Computer - 01-03-2012, 09:14 PM
RE: Timer help - by Statyk - 01-05-2012, 02:03 AM
RE: Timer help - by eagledude4 - 01-05-2012, 02:09 AM
RE: Timer help - by Statyk - 01-05-2012, 02:21 AM
RE: Timer help - by eagledude4 - 01-05-2012, 02:25 AM
RE: Timer help - by flamez3 - 01-05-2012, 03:43 AM
RE: Timer help - by Statyk - 01-05-2012, 03:49 AM
RE: Timer help - by flamez3 - 01-05-2012, 03:54 AM
RE: Timer help - by eagledude4 - 01-05-2012, 05:21 AM
RE: Timer help - by flamez3 - 01-05-2012, 05:29 AM
RE: Timer help - by eagledude4 - 01-05-2012, 05:36 AM
RE: Timer help - by flamez3 - 01-05-2012, 05:57 AM
RE: Timer help - by eagledude4 - 01-05-2012, 05:58 AM
RE: Timer help - by eagledude4 - 01-11-2012, 10:01 PM
RE: Timer help - by Statyk - 01-11-2012, 10:15 PM
RE: Timer help - by eagledude4 - 01-11-2012, 10:40 PM
RE: Timer help - by Statyk - 01-11-2012, 10:43 PM
RE: Timer help - by eagledude4 - 01-11-2012, 10:45 PM
RE: Timer help - by Statyk - 01-11-2012, 10:58 PM
RE: Timer help - by eagledude4 - 01-11-2012, 11:01 PM
RE: Timer help - by Statyk - 01-11-2012, 11:13 PM
RE: Timer help - by eagledude4 - 01-13-2012, 03:36 AM
RE: Timer help - by Statyk - 01-11-2012, 10:48 PM
RE: Timer help - by eagledude4 - 01-11-2012, 10:49 PM
RE: Timer help - by Statyk - 01-11-2012, 10:50 PM
RE: Timer help - by eagledude4 - 01-11-2012, 10:52 PM



Users browsing this thread: 3 Guest(s)