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
What's wrong with my script?
Tirilno Offline
Junior Member

Posts: 27
Threads: 5
Joined: Jul 2011
Reputation: 0
#1
What's wrong with my script?

hello. I asked about this before but I didn't get any answers. I Kinda wanted to make a grunt break the door and come out after me. but he doesn't come out. can anyone look at my script? Smile

void OnStart()
{
AddEntityCollideCallback("Player", "ActiveScareGruntArea" , "ScareGrunt", true , 1);
AddEntityCollideCallback("ScareGrunt", "BreakMonsterDoor", "ScareGrunt", true, 1);
}
void ScareGrunt(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("ScareGrunt", true);
AddEnemyPatrolNode("ScareGrunt", "PathNodeArea_1", 1, "");
AddEnemyPatrolNode("ScareGrunt", "PathNodeArea_2", 1, "");
AddEnemyPatrolNode("ScareGrunt", "PathNodeArea_3", 1, "");
}
void BreakMonsterDoorTimer(string &in asEntity)
{
AddTimer("BreakDoor", 2.0f, "BreakMonsterDoor");
SetEntityActive("ScareGrunt", true);
AddQuest("PortalFormula1", "PortalFormula1");
}

void BreakMonsterDoor(string &in asTimer)
{
SetEntityActive("MonsterDoor", true);
SetEntityActive("MonsterDoor2", true);
PlaySoundAtEntity("WoodScare", "lurker_hit_wood.snt", "Player", 0.0f, false);
PlaySoundAtEntity("GruntScare", "grunt_notice_long.snt", "Player", 0.0f, false);
}

void DespawnScareGrunt(string &in asParent, string &in asChild, int alState)
{
FadeEnemyToSmoke("ScareGrunt", false);
}
void OnLeave
{

}
(This post was last modified: 07-10-2011, 04:43 PM by Tirilno.)
07-10-2011, 01:22 PM
Find
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#2
RE: What's wrong with my script?

If the monster's path nodes pass through the door, then he'll try to break it and then continue on, so if the door is open when that happens, the monster just walks through.

The manual way you do this would already be flawed for what you are trying to achieve.

07-10-2011, 01:30 PM
Find
Tirilno Offline
Junior Member

Posts: 27
Threads: 5
Joined: Jul 2011
Reputation: 0
#3
RE: What's wrong with my script?

(07-10-2011, 01:30 PM)Kyle Wrote: If the monster's path nodes pass through the door, then he'll try to break it and then continue on, so if the door is open when that happens, the monster just walks through.

The manual way you do this would already be flawed for what you are trying to achieve.
Hah, it works now Smile but I need help to one more thing. How can I get mementos or quests when I pick up a note/key? What are the scripts? I have tried to search on it but I didn't find anything. :/

07-10-2011, 02:17 PM
Find
palistov Offline
Posting Freak

Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation: 57
#4
RE: What's wrong with my script?

http://wiki.frictionalgames.com/hpl2/amn..._functions

Use the table of contents to find what you need.

07-10-2011, 02:41 PM
Find
Tirilno Offline
Junior Member

Posts: 27
Threads: 5
Joined: Jul 2011
Reputation: 0
#5
RE: What's wrong with my script?

(07-10-2011, 02:41 PM)palistov Wrote: http://wiki.frictionalgames.com/hpl2/amn..._functions

Use the table of contents to find what you need.

I'm using it Smile
07-10-2011, 04:43 PM
Find




Users browsing this thread: 1 Guest(s)