Frictional Games Forum (read-only)
Unexpected end of file!! ;( - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Unexpected end of file!! ;( (/thread-10627.html)

Pages: 1 2


RE: Unexpected end of file!! ;( - schmupper - 10-06-2011

(10-06-2011, 09:07 AM)Gamemakingdude Wrote: Try changing true to false.
And remove "" from "true"



RE: Unexpected end of file!! ;( - Apfel - 10-06-2011

(10-06-2011, 08:36 AM)cooleoj Wrote: main (4,5) : ERR : no matching signatures to 'AddEntityCollideCallback("Player", "monstertrigger1", "MonsterFunction", "true", 1); '
Gahhh seems i messed up some crazy shit
true without ""

AddEntityCollideCallback("Player", "monstertrigger1", "MonsterFunction", true, 1);




RE: Unexpected end of file!! ;( - cooleoj - 10-06-2011

IT WORKS I LOVE YOU GUYS! <3

Now if any1 could link a script on how to make a entity (a piano) play a sound when i enter that room Smile
And also basic guide to making the freaking exta_lang file work... Those i have checked doesnt work, i wanna name my hollow needle not just make it say "Picked up"



RE: Unexpected end of file!! ;( - Obliviator27 - 10-06-2011

For your piano problem, it's really quite simple. Though it depends on what you want. For example
Code:
void OnStart()
{
AddEntityCollideCallback("Player", "RoomArea", "PlayPianoSound", false, 1);
}
void PlayPianoSound(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "[sound you want to play + .ogg extension]", "[Name of Piano entity]", 0, false);
}
will make the sound at the piano every time you enter the room.
If you want it to happen just once, change
AddEntityCollideCallback("Player", "RoomArea", "PlayPianoSound", false, 1);
to
AddEntityCollideCallback("Player", "RoomArea", "PlayPianoSound", true, 1);

For your extra_lang file, you will want something along the lines of
Code:
<LANGUAGE>
<CATEGORY Name="Description"> Description of your custom story!</CATEGORY>
<CATEGORY Name="Inventory">
        <Entry Name="ItemName_[Item Name]">The name of your item</Entry>
        <Entry Name="ItemDesc_[Item Name]">The description of your item</Entry>
</CATEGORY>
</LANGUAGE>
And be sure that the [Item Name] isn't the in-editor name (I.e, the name under the General Tab) but rather the name in the CustomSubItemTypeName field under the entity tab of the item.



RE: Unexpected end of file!! ;( - cooleoj - 10-06-2011

Thanks for all help it really helped me out and made me understand allitle bit more abit scripting! Big Grin

Haha just two more quickes tho! Smile
How do i give sanity when and the blue screen effect when i unlock the door with a hollowneedle and how do i make the map play music.
Thanks!

Oh yeah how do i write positions for example a loading door?

the door part that is...



RE: Unexpected end of file!! ;( - schmupper - 10-06-2011

You should really take a look on this page http://wiki.frictionalgames.com/hpl2/amnesia/script_functions

And if you find it hard to locate right script try Ctrl+F