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
How do i spawn grunt in closet?
Bramme Offline
Junior Member

Posts: 13
Threads: 5
Joined: Jan 2012
Reputation: 0
#1
How do i spawn grunt in closet?

Can someone say to me how do i spawn grunt i closet? Everytime I try the grunt spawn with open door and start chasing me.
(This post was last modified: 01-06-2012, 07:22 PM by Bramme.)
01-06-2012, 01:11 AM
Find
Statyk Offline
Schrödinger's Mod

Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation: 241
#2
RE: How do i spawn grunt in closet?

I literally don't understand what you are saying....
01-06-2012, 02:16 AM
Find
Quotentote Offline
Member

Posts: 118
Threads: 23
Joined: Dec 2011
Reputation: 11
#3
RE: How do i spawn grunt in closet?

i guess he wants a grunt that's inactive and gets active by triggering, right?
01-06-2012, 02:32 AM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#4
RE: How do i spawn grunt in closet?

(01-06-2012, 02:16 AM)Statyk Wrote: I literally don't understand what you are saying....
Same :/



01-06-2012, 02:32 AM
Find
Bramme Offline
Junior Member

Posts: 13
Threads: 5
Joined: Jan 2012
Reputation: 0
#5
RE: How do i spawn grunt in closet?

I am sorry Sad little tired. I mean like Quotentote wrote.
01-06-2012, 03:29 AM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#6
RE: How do i spawn grunt in closet?

Set the grunt inactive in level editor, resize the closet so the monster will fit in there. Put this in your .hps file for the map

void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "MonsterCloset", true, 1);
}

void MonsterCloset(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("grunt_name", true);
}

Put a ScriptArea near the closet.

01-06-2012, 04:03 AM
Find
Bramme Offline
Junior Member

Posts: 13
Threads: 5
Joined: Jan 2012
Reputation: 0
#7
RE: How do i spawn grunt in closet?

No i got error instead when Sad something wrong with my code?
void OnStart()
{
AddUseItemCallback("", "keystudy_1", "Door_1", "KeyOnDoor", true);
}
void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Door_1", false, false);
PlaySoundAtEntity("", "unlock_door", "Door_1", 0, false);


{
AddEntityCollideCallback("Player", "ScriptArea_1", "cabinet_nice_3", true, 1);
}

void MonsterCloset(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("grunt_name", true);
}
void OnLeave()
{

}
(This post was last modified: 01-06-2012, 04:19 AM by Bramme.)
01-06-2012, 04:19 AM
Find
Statyk Offline
Schrödinger's Mod

Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation: 241
#8
RE: How do i spawn grunt in closet?

void OnStart()
{
AddUseItemCallback("", "keystudy_1", "Door_1", "KeyOnDoor", true);
AddEntityCollideCallback("Player", "ScriptArea_1", "MonsterCloset", true, 1);
}

void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Door_1", false, false);
PlaySoundAtEntity("", "unlock_door", "Door_1", 0, false);
}


void MonsterCloset(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("grunt_name", true);
}


void OnLeave()
{

}




//___________________

Copy all and replace all.
Also make sure to place the proper "grunt_name" in the MonsterCloset function
01-06-2012, 04:34 AM
Find
Bramme Offline
Junior Member

Posts: 13
Threads: 5
Joined: Jan 2012
Reputation: 0
#9
RE: How do i spawn grunt in closet?

Thanks manBig Grin YOu are my heroSmile
01-06-2012, 05:04 AM
Find
eagledude4 Offline
Member

Posts: 144
Threads: 14
Joined: Dec 2011
Reputation: 0
#10
RE: How do i spawn grunt in closet?

Remember to change the thread's prefix to solved.

Its hard to see the truth when you've been blinded by lies.
01-06-2012, 06:56 AM
Find




Users browsing this thread: 1 Guest(s)