Frictional Games Forum (read-only)

Full Version: Extra_english.lang file aint working
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
Spoiler below!

<LANGUAGE>
<CATEGORY Name="CustomStoryMain">
<Entry Name="Description">The old ancient castle of Leinch has got it's rumors. One of 'em is that the Devil is controling the castle and the other is that the Owner is crazy. Do you dare to check if they're true?.</Entry>
</CATEGORY>
<CATEGORY Name="Inventory">
//Key hall2
<Entry Name="ItemDesc_keyhall2">Key to the library</Entry>
<Entry Name="ItemName_keyhall2">Library Key</Entry>
//Key office
<Entry Name="ItemName_office_key">Office key</Entry>
<Entry Name="ItemDesc_office_key">A nice key that is needed to lock and unlock the office.</Entry>
</CATEGORY>
<CATEGORY Name="Level">
<Entry name="room_prison">To the Prison</entry>
</LANGUAGE>


Any can take a look at this file and tell me if there's something wrong because my file aint loading.
<CATEGORY Name="Level">
<Entry name="room_prison">To the Prison</Entry>
</CATEGORY>
</LANGUAGE>
At <Entry name="room_prison">To the Prison</entry>

You didn't capital the last </Entry>, and like Tan said, you didn't add the </CATEGORY> at the end.

Also, at that little area that I said above, You didn't capital the N in Name.

Try this for your script
Spoiler below!
<LANGUAGE>
<CATEGORY Name="CustomStoryMain">
<Entry Name="Description">The old ancient castle of Leinch has got it's rumors. One of 'em is that the Devil is controling the castle and the other is that the Owner is crazy. Do you dare to check if they're true?.</Entry>
</CATEGORY>
<CATEGORY Name="Inventory">
//Key hall2
<Entry Name="ItemDesc_keyhall2">Key to the library</Entry>
<Entry Name="ItemName_keyhall2">Library Key</Entry>
//Key office
<Entry Name="ItemName_office_key">Office key</Entry>
<Entry Name="ItemDesc_office_key">A nice key that is needed to lock and unlock the office.</Entry>
</CATEGORY>
<CATEGORY Name="Level">
<Entry Name="room_prison">To the Prison</Entry>
</CATEGORY>
</LANGUAGE>


(DON'T WORRY THERE IS NO REAL SPOILERS, I JUST PUT THE FILES IN SPOILER TAGS TO MAKE IT EASIER Tongue)

Thanks man! It works!. Smile <3.

Btw!. I just found out that one of my scripts doesn't work :O. Can you guys take a look?

Spoiler below!

////////////////////////////
// Run first time starting map
void OnStart()
//The key "Hall2" is needed to unlock the room called "Hall2" and plays the unlock_door sound.
{
AddEntityCollideCallback("Player", "door_open_hall_key", "Doorslam1", true, 1);
SetEntityPlayerInteractCallback("keyhall2", "monsterspawn", true);
SetEntityPlayerInteractCallback("key_prison", "monsterspawn2", true);
AddUseItemCallback("", "keyhall2", "room_hall2", "UsedKeyOnDoor", true);
AddUseItemCallback("", "key_office", "room_office", "UsedKeyOnDoor2", true);
AddUseItemCallback("", "key_prison", "door_prison", "UsedKeyOnDoor3", true);
AddUseItemCallback("", "key_prison", "door_prison", "SanityWhenPickPrisonKey", true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("room_hall2", false, true);
PlaySoundAtEntity("", "unlock_door", "room_hall2", 0, false);
RemoveItem("keyhall2");
}

void UsedKeyOnDoor2(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("room_office", false, true);
PlaySoundAtEntity("", "unlock_door", "room_office", 0, false);
RemoveItem("key_office");
}

void UsedKeyOnDoor3(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("door_prison", false, true);
PlaySoundAtEntity("", "unlock_door", "door_prison", 0, false);
RemoveItem("key_prison");
}

void TriggerSanityDamageLook(string &in asEntity, int alState)
{
PlaySoundAtEntity("", "react_scare.snt", "Player", 0, false);
GiveSanityDamage(60.0f, true);
PlayMusic("05_event_steps.ogg", false, 80, 0, 10, false);
SetMessage("Inventory","SH*T!",0);
}

void monsterspawn(string &in asEntity)
{
SetEntityActive("monster_key_keeper1", true);
AddEnemyPatrolNode("monster_key_keeper1", "PosNodeArea_1", 0.0f, "");
AddEnemyPatrolNode("monster_key_keeper1", "PosNodeArea_2", 0.0f, "");
AddEnemyPatrolNode("monster_key_keeper1", "PosNodeArea_3", 0.0f, "");
AddEnemyPatrolNode("monster_key_keeper1", "PosNodeArea_4", 0.0f, "");
AddEnemyPatrolNode("monster_key_keeper1", "PosNodeArea_5", 0.0f, "");
AddEnemyPatrolNode("monster_key_keeper1", "PosNodeArea_6", 0.0f, "");
AddEnemyPatrolNode("monster_key_keeper1", "PosNodeArea_7", 0.0f, "");
AddEnemyPatrolNode("monster_key_keeper1", "PosNodeArea_8", 0.0f, "");
AddEnemyPatrolNode("monster_key_keeper1", "PosNodeArea_9", 1.0f, "");
AddEnemyPatrolNode("monster_key_keeper1", "PosNodeArea_10", 1.0f, "");
}
void monsterspawn2(string &in asEntity)
{
PlayMusic("05_event_steps.ogg", false, 80, 0, 10, false);
PlaySoundAtEntity("", "react_scare.snt", "Player", 0, false);
SetEntityActive("EnemyGruntHall", true);
}

void SanityWhenPickPrisonKey(string &in asEntity, int alState)
{
PlaySoundAtEntity("", "react_scare.snt", "Player", 0, false);
GiveSanityDamage(60.0f, true);
PlayMusic("05_event_steps.ogg", false, 80, 0, 10, false);
SetMessage("Inventory","SH*T!",0);
}

void Doorslam1(string &in asParent, string &in asChild, int alState)
{
StartPlayerLookAt("door_to_hall_key", 10, 50, "");
AddTimer("", 0.5f, "TimerSlamDoor");
SetEntityActive("ParticleSystem_1" , true);
}

void TimerSlamDoor(string &in asTimer)
{
SetSwingDoorClosed("door_to_hall_key", true, true);
GiveSanityDamage(4.0f, true);
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
AddTimer("", 2.0f, "TimerStopLook");
}

void TimerStopLook(string &in asTimer)
{
StopPlayerLookAt();
}




////////////////////////////
// Run when entering map
void OnEnter()
{

}
////////////////////////////
// Run when leaving map
void OnLeave()
{

}


Look at the "Doorslam1" Function because it all of a sudden stoped working.


EDIT: And! How to make a monster patroll a specific area?.
I made some paths that the monster walks and then I need him to repeat walking some ceratin paths. Anyone knows why?.

btw XxRoCkBaNdMaNxX you're gonna be in the credits Smile. Thanks for helping me out man!.
You can't activate particle effects like this:
SetEntityActive("ParticleSystem_1" , true);

You have to use area (where you want it to appear) and:
CreateParticleSystemAtEntity(string& asPSName, string& asPSFile, string& asEntity, bool abSavePS); (check this at script functions wiki)

I assume "door_open_hall_key" is an script area?
(05-25-2011, 04:49 PM)Khyrpa Wrote: [ -> ]You can't activate particle effects like this:
SetEntityActive("ParticleSystem_1" , true);

You have to use area (where you want it to appear) and:
CreateParticleSystemAtEntity(string& asPSName, string& asPSFile, string& asEntity, bool abSavePS); (check this at script functions wiki)

I assume "door_open_hall_key" is an script area?

yea. But the thing is that it worked perfect before and then all of a sudden it stoped working.
(05-25-2011, 04:55 PM)xtron Wrote: [ -> ]yea. But the thing is that it worked perfect before and then all of a sudden it stoped working.

All seems to be fine with that function to me, perhaps you accidentally changed something in the level editor? like names and such
(05-25-2011, 05:04 PM)Khyrpa Wrote: [ -> ]All seems to be fine with that function to me, perhaps you accidentally changed something in the level editor? like names and such

Name of script: door_open_hall_key
PlayerLookAtCallback for script: door_open_hall_key

Name of door: door_to_hall_key
CallbackFunc: door_to_hall_key

And the openamount is "1".
Hehe like I asked: "I assume "door_open_hall_key" is an script area?"
If collide callbacks entities are Player and the door, it only happens when you actually hit the door with your body (or it should I'm not sure)
change it to interact callback if you want it to trigger when you touch or use collide callback change the door_open_hall_key into an area where you want the player to trigger it
(05-25-2011, 05:09 PM)Khyrpa Wrote: [ -> ]Hehe like I asked: "I assume "door_open_hall_key" is an script area?"
If collide callbacks entities are Player and the door, it only happens when you actually hit the door with your body (or it should I'm not sure)
change it to interact callback if you want it to trigger when you touch or use collide callback change the door_open_hall_key into an area where you want the player to trigger it

so:
Code:
AddEntityInteractCallback("Player", "door_open_hall_key", "Doorslam1", true, 1);

If I want him to access the script area and the door closes?
Pages: 1 2 3 4