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
Script Help Is it possible to kill a grunt ?
Daemian Offline
Posting Freak

Posts: 1,129
Threads: 42
Joined: Dec 2012
Reputation: 49
#1
Is it possible to kill a grunt ?

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?

12-27-2012, 04:09 AM
Find
str4wberrypanic Offline
Member

Posts: 241
Threads: 24
Joined: Jul 2012
Reputation: 8
#2
RE: Is it possible to kill a grunt ?

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.

12-27-2012, 04:27 AM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#3
RE: Is it possible to kill a grunt ?

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

Trying is the first step to success.
12-27-2012, 09:43 AM
Find
Tiero Offline
Member

Posts: 126
Threads: 13
Joined: Mar 2011
Reputation: 11
#4
RE: Is it possible to kill a grunt ?

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.

[Image: 111.jpg]
(This post was last modified: 12-27-2012, 10:57 AM by Tiero.)
12-27-2012, 10:53 AM
Website Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#5
RE: Is it possible to kill a grunt ?

In my story "The Chasing"

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

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()
{
}


THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
12-27-2012, 12:25 PM
Find




Users browsing this thread: 2 Guest(s)