eagledude4
Member
Posts: 144
Threads: 14
Joined: Dec 2011
Reputation:
0
|
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.)
|
|