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 ?
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


Messages In This Thread
Is it possible to kill a grunt ? - by Daemian - 12-27-2012, 04:09 AM
RE: Is it possible to kill a grunt ? - by Tiero - 12-27-2012, 10:53 AM
RE: Is it possible to kill a grunt ? - by The chaser - 12-27-2012, 12:25 PM



Users browsing this thread: 1 Guest(s)