01-06-2012, 01:11 AM
01-06-2012, 02:16 AM
I literally don't understand what you are saying....
01-06-2012, 02:32 AM
i guess he wants a grunt that's inactive and gets active by triggering, right?
01-06-2012, 02:32 AM
(01-06-2012, 02:16 AM)Statyk Wrote: [ -> ]I literally don't understand what you are saying....Same :/
01-06-2012, 03:29 AM
I am sorry little tired. I mean like Quotentote wrote.
01-06-2012, 04:03 AM
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.
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:19 AM
No i got error instead when 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()
{
}
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()
{
}
01-06-2012, 04:34 AM
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
{
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, 05:04 AM
Thanks man YOu are my hero
01-06-2012, 06:56 AM
Remember to change the thread's prefix to solved.