Frictional Games Forum (read-only)

Full Version: CheckPoint issue and memento.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi.

I just started an outside map. And I put some scripts on it... Now... dont know whats wrong because the game DONT crash!... but one memento and the chekpoint dont work... I try lot of things to make it change but nothing make it hapens.
Here is the WHOLE script in the map.

void OnStart()
{
AddEntityCollideCallback("Player", "AreaOfDeep", "Drowned", true, 1);

AddEntityCollideCallback("Player", "AreaWaterMemento", "EventWaterQuest", true, 1);

AddEntityCollideCallback("WoodenBoardItem1", "ScriptWooden1", "PositionFirstBoard", true, 1);
AddEntityCollideCallback("WoodenBoardItem2", "ScriptWooden2", "PositionSecondBoard", true, 1);
}

void EventWaterQuest(string &in asParent, string &in asChild, int alState)
{
AddQuest("area", "watermemento");
}

void ElevatorNotWorking(string &in asEntity, int LeverState)
{
if(LeverState == 1)
{
AddQuest("Elevator", "cantuseelevator");
PlaySoundAtEntity("", "elevator_lever_min", "Lever", 0, false);
SetLeverStuckState(asEntity, LeverState, true);
}
}

void Drowned(string &in asParent, string &in asChild, int alState)
{
CheckPoint("Checkpoint1", "PlayerStartArea_1","", "DeathCategory", "Deathtext");
PlaySoundAtEntity("", "impact_water_high3", "Player", 0, false);
}


void PositionFirstBoard(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("WoodenBoardItem1", false);
PlaySoundAtEntity("", "04_place_wood.snt", "ScriptWooden1", 0, false);
SetEntityActive("WoodenBoardJoint1", true);
}

void PositionSecondBoard(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("WoodenBoardItem2", false);
PlaySoundAtEntity("", "04_place_wood.snt", "ScriptWooden2", 0, false);
SetEntityActive("WoodenBoardJoint2", true);
}

The watermemento and the chekpoint are not working...
The Memento.. When the character enter to the script area "AreaWaterMemento" the little journal icon in the bottom appears, but when I open it there is nothing wrote on it.
(I DID WRITE THE CODE IN THE EXTRA_LANG file!!), here it is...

<CATEGORY Name="Journal">
<Entry Name="Quest_watermemento_Text">I should be careful, the lake is deep and the flow is too high tonight </Entry>
</CATEGORY>

The other thing is the ChekPoint, the area where player collides is "AreaOfDeep", and its suposed when the character enters there he dies (drowned) and then teleport, but when I enter to the area nothing hapens.

Please whats wrong with the scripts to make them not work???

thanks
Does the custom story description (in the menu) appear correctly?

Also, could you post the full extra_english.lang ?

As for the checkpoints.
If you add a checkpoint somewhere, it won't kill the player.
You just say that you want player to spawn at "PlayerStartArea_1" and display certain text.

To kill a player, use:
PHP Code:
SetPlayerHealth(0.0f); 
(02-29-2016, 07:49 PM)Spelos Wrote: [ -> ]Does the custom story description (in the menu) appear correctly?

Also, could you post the full extra_english.lang ?

As for the checkpoints.
If you add a checkpoint somewhere, it won't kill the player.
You just say that you want player to spawn at "PlayerStartArea_1" and display certain text.

To kill a player, use:
PHP Code:
SetPlayerHealth(0.0f); 

Hi.

That comand.. should I put it Before the teleport? (before check)

Here is the extra_english.lang

<LANGUAGE>
<CATEGORY Name="CustomStoryMain">
<Entry Name="Description">
You are Eric, after your grandma died you found a letter
about your parents. This is not a scary CS.
</Entry>
</CATEGORY>

<CATEGORY Name="Journal">

///////////////////////////NOTES///////////////////////////

<Entry Name="Note_diario1_Name">To Eric</Entry>
<Entry Name="Note_diario1_Text">
UNDER CONSTRUCTION
April 5, 1933

Lourdes</Entry>

<Entry Name="Note_JulianI_Name">Julian Diary</Entry>
<Entry Name="Note_JulianI_Text">
UNDER CONSTRUCTION
March 11, 1933


- Julian Ilans
</Entry>

<Entry Name="Note_Discovery_Name">Description</Entry>
<Entry Name="Note_Discovery_Text">
UNDER CONSTRUCTION


</Entry>


<Entry Name="Note_ThomasRecruitI_Name">The Expeditionary</Entry>
<Entry Name="Note_ThomasRecruitI_Text">
UNDER CONSTRUCTION


- XX Company
</Entry>

<Entry Name="Note_LourdesIII_Name">The Expeditionary</Entry>
<Entry Name="Note_LourdesIII_Text">
UNDER CONSTRUCTION


</Entry>


<Entry Name="Note_LourdesII_Name">Dear Eric</Entry>
<Entry Name="Note_LourdesII_Text">
UNDER CONSTRUCTION


</Entry>

<Entry Name="Note_JulianII_Name"> Last Instructions</Entry>
<Entry Name="Note_JulianII_Text">
UNDER CONSTRUCTION

</Entry>

///////////////////////////MEMENTOS///////////////////////////
<Entry Name="Quest_EricDoorClosed_Text"> This door requires a key </Entry>
<Entry Name="Quest_LourenDoorClosed_Text"> This door requires a key </Entry>
<Entry Name="Quest_MansionStudyDoorClosed_Text"> This door is locked. Maybe there's another way to go? </Entry>

<Entry Name="Quest_HatchDoorClosed_Text"> I need the right tool to open this hatch </Entry>
<Entry Name="Quest_GoUpHatch_Text"> I need to find a ladder </Entry>

<Entry Name="Quest_FindTheSecretKey_Text"> The note said that there is a key inside a bible in this library. </Entry>


<Entry Name="Quest_watermemento_Text">I should be careful, the lake is deep and the flow is too high tonight.</Entry>

<Entry Name="Quest_cantuseelevator_Text">This elevator is no longer working, I must find another way up.</Entry>


</CATEGORY>


///////////////////////////ITEMS AND DESCRIPTIONS///////////

<CATEGORY Name="Inventory">
<Entry Name="ItemName_roomkey"> Eric´s Room Key </Entry>
<Entry Name="ItemDesc_roomkey"> This is my key room </Entry>

<Entry Name="ItemName_grandmakey"> Lourdes´s Room Key </Entry>
<Entry Name="ItemDesc_grandmakey"> This is Lourdes´s room key </Entry>

<Entry Name="ItemName_granmasecretkey"> Unknown Key </Entry>
<Entry Name="ItemDesc_granmasecretkey"> I never saw this key before...It is supposed to open the door of an antique desk in the attic </Entry>

<Entry Name="ItemName_exitkey"> Exit Key </Entry>
<Entry Name="ItemDesc_exitkey"> This key is for leaving the house... </Entry>

</CATEGORY>

///////////////////////////LEVELS//////////////////////////

<CATEGORY Name="Levels">
<Entry Name="Door1"> First floor </Entry>
<Entry Name="Door2"> Second floor </Entry>
<Entry Name="Door3"> Exit </Entry>
<Entry Name="Door4"> Black´s Mansion </Entry>

</CATEGORY>

//////////////////////////DEATH////////////////////////////
<CATEGORY Name=“DeathCategory”>
<Entry Name=“Deathtext”> Beware of the water, the stream is too strong! </Entry>
</CATEGORY


</LANGUAGE>
Put that command after the CheckPoint setup.

And about that .lang
  • “DeathCategory” <-- These quotation marks cannot be used!
  • Do not use ENTER to get to new line, use [br]. If you write that, it will get to the new line.
  • Really? </CATEGORY ... Finish your Tags.

    Also...

    PHP Code:
    //////////////////////////DEATH////////////////////////////
    <CATEGORY Name=“DeathCategory”
    <
    Entry Name=“Deathtext”Beware of the water
    the stream is too strong! </Entry
    </
    CATEGORY 
    meh..

    PHP Code:
    <!-- DEATH MESSAGES -->
    <
    CATEGORY Name=“DeathCategory”
        <
    Entry Name=“Deathtext”Beware of the waterthe stream is too strong!</Entry
    </
    CATEGORY
    Better