Frictional Games Forum (read-only)
[SCRIPT] Is it possible to kill a grunt ? - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: [SCRIPT] Is it possible to kill a grunt ? (/thread-19695.html)



Is it possible to kill a grunt ? - Daemian - 12-27-2012

if not, what's the better way to simulate its death?

like a sudden black screen followed by grunt pieces on the floor.
any ideas?


RE: Is it possible to kill a grunt ? - str4wberrypanic - 12-27-2012

You mean during the game or with a script?
During the game you can't, but if you want to make a CS, you could make it vanish with smoke or set it unnactive and set the grunt body parts active in the ground, in pieces.


RE: Is it possible to kill a grunt ? - FlawlessHappiness - 12-27-2012

Or search around the forum. There is a grunt-ragdoll somewhere.

You can't spawn the ragdoll anywhere you want but you can simulate the death of a grunt to be at one place, and then you have to lure the grunt over there


RE: Is it possible to kill a grunt ? - Tiero - 12-27-2012

void OnStart
{
AddEntityCollideCallback("BOX", "Grunt", "KillGrunt", true, 1);
}

void KillGrunt(string &in asParent, string &in asChild, int alState)
{
FadeEnemyToSmoke("Grunt", true);
}

// Here you throw the box in a grunt, and he "dies". For the beauty you can add sound, a simulated explosion or die and various particles.


RE: Is it possible to kill a grunt ? - The chaser - 12-27-2012

In my story "The Chasing"

Spoiler below!
You have to kill a brute with a hammer (sledge_1). This is my script:

Code:
void OnStart (){AddEntityCollideCallback("Player", "ScriptArea_1", "Fight", true, 1);AddEntityCollideCallback("Player", "ScriptArea_2", "DiePlayer", true, 1);AddEntityCollideCallback("sledge_1", "Master", "Destroy", true, 1);}
void DiePlayer(string &in asParent, string &in asChild, int alState){CheckPoint("StartUpCP", "PlayerStartArea_2", "HAPPENSAFTERYOUDIE", "", "");}
void Destroy(string &in asParent, string &in asChild, int alState){AddTimer("", 1.0f, "Hits");func_on1();AddLocalVarInt("Kill", 1);}
void Hits (string &in asTimer){AddEntityCollideCallback("sledge_1", "Master", "Destroy", true, 1);}
void func_on1(){if (GetLocalVarInt("Kill") == 1){    FadeEnemyToSmoke("Master", true);    AddTimer("", 6, "Credits");    SetMessage("Messages", "WalkQuest_final", 5);}}
void HAPPENSAFTERYOUDIE(string &in asName, int alCount) {AddEntityCollideCallback("Player", "ScriptArea_1", "Fight", true, 1);AddEntityCollideCallback("Master", "Kill", "Smoke", true, 1);}void Credits (string &in asTimer){StartCredits("",false,"Ending","Credits",800);PlayMusic("Ending_c.ogg", true, 1, 1, 1, true);}
void Fight(string &in asParent, string &in asChild, int alState){ShowEnemyPlayerPosition("Master");SetEntityActive("Master", true);}


void Smoke (string &in asParent, string &in asChild, int alState){FadeEnemyToSmoke("Master", true);SetMessage("Messages", "WalkQuest_final", 5);AddTimer("", 10, "Credits");}
void OnEnter (){
}


void OnLeave()
{
}