Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 5 Vote(s) - 3.8 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Scripting, need urgent help!
DRedshot Offline
Senior Member

Posts: 374
Threads: 23
Joined: Jun 2011
Reputation: 11
#70
RE: Scripting, need urgent help!

maybe you could add a checkpoint, then when you die, make it roll the credits right away, you may have to look into checkpoints, 'cos i've never actually used them myself, but i know that they execute when you die, and can be used to set death hints. If you use notepad++ with the .hps plugins (http://wiki.frictionalgames.com/hpl2/thi...xt/notepad) you should just be able to type checkpoint, and use arrow keys untill you find the right function. hope this helps Smile
yep, i found the function on the wiki:

here it is:

CheckPoint (string& asName, string& asStartPos, string& asCallback, string& asDeathHintCat, string& asDeathHintEntry);

Sets a checkpoint at which the player will respawn in case he dies.
Callback syntax: void MyFunc(string &in asName, int alCount)
Count is 0 on the first checkpoint load!

asName - the internal name
asStartPos - the name of the StartPos in the editor
asCallback - the function to call when the player dies/respawns
asDeathHintCat - the category of the death hint message to be used in the .lang file
asDeathHintEntry - the entry in the .lang file

so in your case the code will go like this:
void OnStart()
{
AddEntityCollideCallback("Player", "monster_death", "MonsterFunc1", true, 1);
}

void MonsterFunc1(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("monster_grunt" , true);
SetPlayerActive(false);
CheckPoint ("EndGame", "Player_Start", "StartCredits", "DeathHintCategory", "DeathHintEntry");
}
void StartCredits(string &in asName , int &in alState)
{
StartCredits("", true, "Credits", "End", 10);
}

DeathHintCategory is the category name of your choice in the .lang file
DeathHintEntry is the name of your choice, and the text will be "The End" in your case
Credits is the category for your credits in the .lang file
End is the entry for your credits also in .lang

ps: I have copied some of the code above from jenniferOrange, All of the stuff after "SetPlayerActive(false);" is new stuff

Hope this helps you out!

(This post was last modified: 07-24-2011, 05:41 AM by DRedshot.)
07-24-2011, 05:28 AM
Find


Messages In This Thread
Scripting, need urgent help! - by JetlinerX - 07-20-2011, 03:20 AM
RE: Scripting, need urgent help! - by xtron - 07-20-2011, 04:04 AM
RE: Scripting, need urgent help! - by JetlinerX - 07-20-2011, 04:15 AM
RE: Scripting, need urgent help! - by xtron - 07-20-2011, 06:31 AM
RE: Scripting, need urgent help! - by MrCookieh - 07-20-2011, 09:58 AM
RE: Scripting, need urgent help! - by JetlinerX - 07-20-2011, 02:58 PM
RE: Scripting, need urgent help! - by MrCookieh - 07-20-2011, 03:11 PM
RE: Scripting, need urgent help! - by JetlinerX - 07-20-2011, 03:22 PM
RE: Scripting, need urgent help! - by JetlinerX - 07-21-2011, 12:08 AM
RE: Scripting, need urgent help! - by MrCookieh - 07-21-2011, 09:56 AM
RE: Scripting, need urgent help! - by JetlinerX - 07-23-2011, 10:00 PM
RE: Scripting, need urgent help! - by JetlinerX - 07-23-2011, 10:28 PM
RE: Scripting, need urgent help! - by MrCookieh - 07-23-2011, 10:34 PM
RE: Scripting, need urgent help! - by JetlinerX - 07-23-2011, 10:38 PM
RE: Scripting, need urgent help! - by JetlinerX - 07-23-2011, 10:45 PM
RE: Scripting, need urgent help! - by MrCookieh - 07-23-2011, 10:48 PM
RE: Scripting, need urgent help! - by JetlinerX - 07-23-2011, 10:53 PM
RE: Scripting, need urgent help! - by JetlinerX - 07-23-2011, 11:01 PM
RE: Scripting, need urgent help! - by MrCookieh - 07-23-2011, 11:04 PM
RE: Scripting, need urgent help! - by MrCookieh - 07-23-2011, 11:07 PM
RE: Scripting, need urgent help! - by JetlinerX - 07-23-2011, 11:14 PM
RE: Scripting, need urgent help! - by JetlinerX - 07-24-2011, 12:00 AM
RE: Scripting, need urgent help! - by JetlinerX - 07-24-2011, 12:21 AM
RE: Scripting, need urgent help! - by JetlinerX - 07-24-2011, 12:36 AM
RE: Scripting, need urgent help! - by JetlinerX - 07-24-2011, 12:49 AM
RE: Scripting, need urgent help! - by JetlinerX - 07-24-2011, 01:30 AM
RE: Scripting, need urgent help! - by JetlinerX - 07-24-2011, 01:53 AM
RE: Scripting, need urgent help! - by JetlinerX - 07-24-2011, 02:13 AM
RE: Scripting, need urgent help! - by JetlinerX - 07-24-2011, 02:34 AM
RE: Scripting, need urgent help! - by JetlinerX - 07-24-2011, 02:55 AM
RE: Scripting, need urgent help! - by JetlinerX - 07-24-2011, 03:01 AM
RE: Scripting, need urgent help! - by JetlinerX - 07-24-2011, 03:10 AM
RE: Scripting, need urgent help! - by JetlinerX - 07-24-2011, 03:28 AM
RE: Scripting, need urgent help! - by JetlinerX - 07-24-2011, 03:41 AM
RE: Scripting, need urgent help! - by JetlinerX - 07-24-2011, 03:58 AM
RE: Scripting, need urgent help! - by JetlinerX - 07-24-2011, 04:06 AM
RE: Scripting, need urgent help! - by JetlinerX - 07-24-2011, 04:16 AM
RE: Scripting, need urgent help! - by JetlinerX - 07-24-2011, 04:27 AM
RE: Scripting, need urgent help! - by JetlinerX - 07-24-2011, 04:35 AM
RE: Scripting, need urgent help! - by JetlinerX - 07-24-2011, 04:51 AM
RE: Scripting, need urgent help! - by JetlinerX - 07-24-2011, 05:18 AM
RE: Scripting, need urgent help! - by DRedshot - 07-24-2011, 05:28 AM
RE: Scripting, need urgent help! - by JetlinerX - 07-24-2011, 05:42 AM
RE: Scripting, need urgent help! - by MrCookieh - 07-24-2011, 09:08 AM
RE: Scripting, need urgent help! - by DRedshot - 07-24-2011, 12:19 PM
RE: Scripting, need urgent help! - by JetlinerX - 07-24-2011, 04:01 PM
RE: Scripting, need urgent help! - by seth1466 - 07-25-2011, 06:20 PM
RE: Scripting, need urgent help! - by JetlinerX - 07-25-2011, 06:21 PM
RE: Scripting, need urgent help! - by JetlinerX - 07-25-2011, 06:31 PM
RE: Scripting, need urgent help! - by JetlinerX - 07-25-2011, 06:34 PM
RE: Scripting, need urgent help! - by MrCookieh - 07-25-2011, 06:40 PM
RE: Scripting, need urgent help! - by JetlinerX - 07-25-2011, 06:45 PM
RE: Scripting, need urgent help! - by MrCookieh - 07-25-2011, 06:50 PM
RE: Scripting, need urgent help! - by JetlinerX - 07-25-2011, 06:52 PM
RE: Scripting, need urgent help! - by MrCookieh - 07-25-2011, 07:03 PM
RE: Scripting, need urgent help! - by JetlinerX - 07-25-2011, 07:07 PM
RE: Scripting, need urgent help! - by MrCookieh - 07-25-2011, 07:12 PM
RE: Scripting, need urgent help! - by JetlinerX - 07-25-2011, 07:23 PM
RE: Scripting, need urgent help! - by MrCookieh - 07-25-2011, 08:58 PM
RE: Scripting, need urgent help! - by JetlinerX - 07-27-2011, 03:21 AM
RE: Scripting, need urgent help! - by Kyle - 07-27-2011, 03:31 AM
RE: Scripting, need urgent help! - by JetlinerX - 07-27-2011, 03:46 AM
RE: Scripting, need urgent help! - by xiphirx - 07-27-2011, 03:50 AM
RE: Scripting, need urgent help! - by Kyle - 07-27-2011, 03:54 AM
RE: Scripting, need urgent help! - by xiphirx - 07-27-2011, 05:37 AM
RE: Scripting, need urgent help! - by JetlinerX - 07-27-2011, 03:52 AM
RE: Scripting, need urgent help! - by JetlinerX - 07-27-2011, 03:56 AM
RE: Scripting, need urgent help! - by JetlinerX - 07-27-2011, 06:40 AM
RE: Scripting, need urgent help! - by xiphirx - 07-27-2011, 06:52 AM
RE: Scripting, need urgent help! - by JetlinerX - 07-27-2011, 06:59 AM
RE: Scripting, need urgent help! - by MrCookieh - 07-27-2011, 11:15 AM
RE: Scripting, need urgent help! - by JetlinerX - 07-27-2011, 04:30 PM
RE: Scripting, need urgent help! - by xiphirx - 07-27-2011, 06:24 PM
RE: Scripting, need urgent help! - by JetlinerX - 07-27-2011, 06:33 PM
RE: Scripting, need urgent help! - by xiphirx - 07-27-2011, 06:41 PM
RE: Scripting, need urgent help! - by JetlinerX - 07-27-2011, 06:46 PM
RE: Scripting, need urgent help! - by JetlinerX - 07-27-2011, 08:57 PM
RE: Scripting, need urgent help! - by JetlinerX - 07-27-2011, 11:15 PM
RE: Scripting, need urgent help! - by JetlinerX - 07-28-2011, 04:37 AM
RE: Scripting, need urgent help! - by seth1466 - 07-28-2011, 05:33 AM
RE: Scripting, need urgent help! - by JetlinerX - 07-28-2011, 05:34 AM
RE: Scripting, need urgent help! - by JetlinerX - 07-29-2011, 12:58 AM
RE: Scripting, need urgent help! - by Apjjm - 07-29-2011, 01:11 AM
RE: Scripting, need urgent help! - by DRedshot - 07-29-2011, 01:06 AM
RE: Scripting, need urgent help! - by xiphirx - 07-29-2011, 01:51 AM
RE: Scripting, need urgent help! - by Apjjm - 07-29-2011, 02:04 AM
RE: Scripting, need urgent help! - by xiphirx - 07-29-2011, 02:37 AM
RE: Scripting, need urgent help! - by Apjjm - 07-29-2011, 03:01 AM
RE: Scripting, need urgent help! - by JetlinerX - 07-29-2011, 04:16 AM
RE: Scripting, need urgent help! - by JetlinerX - 08-17-2011, 05:31 PM
RE: Scripting, need urgent help! - by darkside - 08-20-2011, 11:28 AM
RE: Scripting, need urgent help! - by Kyle - 08-20-2011, 12:59 PM
RE: Scripting, need urgent help! - by JetlinerX - 08-20-2011, 03:19 PM



Users browsing this thread: 1 Guest(s)