Frictional Games Forum (read-only)
Quick script func! - 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: Quick script func! (/thread-8866.html)



Quick script func! - SLAMnesia - 06-29-2011

Heya!
Whats the script line for a function where it displays a message in the middle of your screen while you look at an entity?
I know it involves .lang file as well but I'm really lost can someone give me an entire description of what I need to do Big Grin plox

this is what I have so far:
Code:
void OnStart()
{
SetEntityPlayerLookAtCallback( "shirt1", "LookingFunc1", false);
}


void LookingFunc1(string &in entity, int alState)
{
void SetMessage(shirt, shirt, 1);
}



RE: Quick script func! - Kyle - 06-29-2011

I might as well just give you an example.

This is what somebody's extra_english.lang file could look like:

Code:
<LANGUAGE>
<CATEGORY Name="Messages">
<Entry Name="Message01">Hello world!</Entry>
</CATEGORY>
</LANGUAGE>

With that, they could use a SetMessage command that looks like this:

SetMessage("Messages", "Message01", 3);

If that were to run, it would display "Hello world!" to the center of the screen. I hope this helps. Smile


RE: Quick script func! - SLAMnesia - 06-29-2011

yeah yeah! i think thats it!
I'll try it real quick
Sad didnt work.
is anything wrong with my OnStart script?

SetEntityPlayerLookAtCallback("shirt1", "LookingFunc1", false);

?