The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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


Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Checkpoints
Datguy5 Offline
Senior Member

Posts: 629
Threads: 25
Joined: Dec 2011
Reputation: 12
#1
Checkpoints

Hello people!
I have made that when an player enters a area he gets killed and then he should spawn in a jail.It needs checkpoints but how would i do it?Oh and i also want that when the player starts from the jail.And is it possible to make a short intro when the player spawns in the jail?Or does that need another map or something.

////////////////////////////
// Run when the map starts
void OnStart()
{
SetPlayerHealth(10);
SetPlayerSanity(40);
SetPlayerActive(false);
FadeIn(3.0f);
MovePlayerHeadPos(0, -1.0f, 0, 13, 11);
PlayMusic("amb_extra02.ogg", true, 1.0f, 1.0f, 1, false);
SetPlayerCrouching(true);
FadeRadialBlurTo(2.0f, 1);
AddTimer("", 6, "Player");
AddTimer("", 2, "Cough");
StartPlayerLookAt("Look", 2, 4, "StopPlayerLookAt");
PlaySoundAtEntity("", "player_cough.snt", "Player", 0, false);
AddEntityCollideCallback("Player", "Message_1", "Message1", true, 1);
AddEntityCollideCallback("Player", "Message_2", "Message2", true, 1);
AddEntityCollideCallback("Player", "Message_3", "Message3", true, 1);
AddEntityCollideCallback("Player", "Blood", "Message4", true, 1);
AddEntityCollideCallback("Player", "Sound", "Hear", true, 1);
AddEntityCollideCallback("Player", "Sound2", "Hear2", true, 1);
AddEntityCollideCallback("Player", "Trap", "Omg", true, 1);
AddEntityCollideCallback("Player", "Say", "Here", true, 1);
SetEntityPlayerLookAtCallback("Sign_1", "Look_1", false);
SetEntityPlayerLookAtCallback("Sign_2", "Look_2", false);
}
void Cough(string &in asTimer)
{
PlaySoundAtEntity("", "player_cough.snt", "Player", 0, false);
SetMessage("Messages", "Message1", 4);
}
void Player(string &in asTimer)
{
PlaySoundAtEntity("", "react_sigh.snt", "Player", 0, false);
SetPlayerActive(true);
MovePlayerHeadPos(0, 0, 0, 10, 20);
SetPlayerCrouching(false);
FadeRadialBlurTo(0, 3);
}
void Message1(string &in asChild, string &in asParent, int alState)
{
SetMessage("Messages", "Popup1", 4);
}
void Message2(string &in asChild, string &in asParent, int alState)
{
SetMessage("Messages", "Popup2", 4);
}
void Sign_1(string &in asEntity, int alState)
{
SetMessage("Signs", "Sign1", 2);
}
void Sign_2(string &in asEntity, int alState)
{
SetMessage("Signs", "Sign2", 2);
}
void Message3(string &in asChild, string &in asParent, int alState)
{
SetMessage("Messages", "Popup3", 3);
}
void Message4(string &in asChild, string &in asParent, int alState)
{
SetMessage("Messages", "Popup4", 3);
PlaySoundAtEntity("", "react_scare", "Player", 0, false);
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
GiveSanityDamage(10.0f, true);
}
void Hear(string &in asChild, string &in asParent, int alState)
{
PlaySoundAtEntity("", "enabled.snt", "Player", 0, false);
SetMessage("Messages", "Popup5", 3);
GiveSanityDamage(10.0f, true);
}
void Hear2(string &in asChild, string &in asParent, int alState)
{
PlaySoundAtEntity("", "ambience_haunting.ogg", "Player", 0, false);
}
void Here(string &in asChild, string &in asParent, int alState)
{
SetMessage("Messages", "Popup6", 3);
}
void Omg(string &in asChild, string &in asParent, int alState)
{
SetEntityActive("Este", true);
SetEntityActive("Este2", true);
SetEntityActive("Este3", true);
SetEntityActive("Grunt", true);
ShowEnemyPlayerPosition("Grunt");
PlaySoundAtEntity("", "pickaxe_hit.snt", "Player", 0, false);
SetMessage("Messages", "Popup7", 3);
}
////////////////////////////
// Run when entering map
void OnEnter()
{
SetPlayerLampOil(0);
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}

And how do i make death hint saying something then.Here is my lang file:

<LANGUAGE>
<CATEGORY Name="CustomStoryMain">
<Entry Name="Description">YOUR DESCRIPTION HERE</Entry>
</CATEGORY>
<CATEGORY Name="Messages">
<Entry Name="Popup1">Ugh,what happened...</Entry>
<Entry Name="Popup2">I should pick up that torch and try to find a way out of here.</Entry>
<Entry Name="Popup3">Hmm,this place looks like an abandoned mine.</Entry>
<Entry Name="Popup4">Is that blood!?</Entry>
<Entry Name="Popup5">What was that!!?</Entry>
<Entry Name="Popup6">This must be the right way.</Entry>
<Entry Name="Popup7">Im trapped!!</Entry>

</CATEGORY>
<CATEGORY Name="Signs">
<Entry Name="Sign1">Storage</Entry>
<Entry Name="Sign2">Equipment</Entry>
</CATEGORY>
<CATEGORY Name="Levels">
</CATEGORY>
</LANGUAGE>




(This post was last modified: 03-05-2012, 06:39 PM by Datguy5.)
03-04-2012, 05:11 PM
Find


Messages In This Thread
Checkpoints - by Datguy5 - 03-04-2012, 05:11 PM
RE: Checkpoints and ambient sounds - by Datguy5 - 03-04-2012, 05:52 PM
RE: Checkpoints and ambient sounds - by Datguy5 - 03-05-2012, 02:44 PM
RE: Checkpoints and ambient sounds - by trollox - 03-05-2012, 02:55 PM
RE: Checkpoints and ambient sounds - by Datguy5 - 03-05-2012, 03:05 PM
RE: Checkpoints and ambient sounds - by trollox - 03-05-2012, 03:31 PM
RE: Checkpoints and ambient sounds - by Datguy5 - 03-05-2012, 03:40 PM
RE: Checkpoints - by Your Computer - 03-05-2012, 06:06 PM
RE: Checkpoints - by Datguy5 - 03-05-2012, 06:10 PM
RE: Checkpoints - by Your Computer - 03-05-2012, 06:17 PM
RE: Checkpoints - by Datguy5 - 03-05-2012, 06:24 PM
RE: Checkpoints - by Stepper321 - 03-05-2012, 06:34 PM
RE: Checkpoints - by Datguy5 - 03-05-2012, 06:38 PM



Users browsing this thread: 1 Guest(s)