Frictional Games Forum (read-only)
[SCRIPT] Almost done - 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: [SCRIPT] Almost done (/thread-16828.html)



Almost done - Lizard - 07-08-2012

Hi guys.

Im almost done with my first custom story, i only have three things that puts me to stop.

First. i have two script that dosen't work, although i can't find any error or missing thing, that could make them not work

The first one was supposed to make voices, but nothing happens

AddEntityCollideCallback("Player", "VoiceArea", "Voices", true, 1);

void Voices(string& asSoundName, string& asSoundFile, string& asEntity, float afFadeTime, bool abSaveSound)
{
PlaySoundAtEntity("", "ambience_voice", "Player", 0, false);
}



The second one was supposed to make a terror sound, like a monster was hunting, but nothing happens

SetEntityPlayerInteractCallback("potion_sanity_1", "FakeMonster", true);

void FakeMonster(string& asSoundName, string& asSoundFile, string& asEntity, float afFadeTime, bool abSaveSound)
{
PlaySoundAtEntity("", "ui_terror_meter", "Player", 0, false);
}




The last thing that irritates me, is that i dont know to make the game.
Like when you go through the last door, but instead of going to another room or map, the story ends.

I would be glad if you guys would help me


RE: Almost done - Cruzore - 07-08-2012

wrong callback syntax. I think i'll explain it to you, since you don't seem to understand the callback syntax:
When you look at http://wiki.frictionalgames.com/hpl2/amnesia/script_functions
and search for SetEntityPlayerInteractCallback, you see that the callback syntax is void MyFunc(string &in asEntity)
All you change is "MyFunc", not anything in the brackets.


RE: Almost done - Lizard - 07-08-2012

(07-08-2012, 10:37 AM)FastHunteR Wrote: wrong callback syntax. I think i'll explain it to you, since you don't seem to understand the callback syntax:
When you look at http://wiki.frictionalgames.com/hpl2/amnesia/script_functions
and search for SetEntityPlayerInteractCallback, you see that the callback syntax is void MyFunc(string &in asEntity)
All you change is "MyFunc", not anything in the brackets.
DOH!!!

What a stupid mistake. I was making this in the middle of the night, so was really sleepy, which i can see let to some stupid mistakes.

Thank for correting me, on my stupidity.

Now i only have the "end the story" problem


RE: Almost done - Cruzore - 07-08-2012

with "end of story", do you mean
StartCredits(string& asMusic, bool abLoopMusic, string& asTextCat, string& asTextEntry, int alEndNum);


RE: Almost done - Lizard - 07-08-2012

(07-08-2012, 11:13 AM)FastHunteR Wrote: with "end of story", do you mean
StartCredits(string& asMusic, bool abLoopMusic, string& asTextCat, string& asTextEntry, int alEndNum);
*facepalm*

I think i'll just print out that side, and really look it through, before i embarrassing my self to much.(if isn't to late already) Big Grin