Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Quick script func!
SLAMnesia Offline
Member

Posts: 99
Threads: 39
Joined: May 2011
Reputation: 0
#1
Quick script func!

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:
void OnStart()
{
SetEntityPlayerLookAtCallback( "shirt1", "LookingFunc1", false);
}


void LookingFunc1(string &in entity, int alState)
{
void SetMessage(shirt, shirt, 1);
}
06-29-2011, 03:03 AM
Find
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#2
RE: Quick script func!

I might as well just give you an example.

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

<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

(This post was last modified: 06-29-2011, 03:14 AM by Kyle.)
06-29-2011, 03:13 AM
Find
SLAMnesia Offline
Member

Posts: 99
Threads: 39
Joined: May 2011
Reputation: 0
#3
RE: Quick script func!

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);

?
(This post was last modified: 06-29-2011, 09:15 PM by SLAMnesia.)
06-29-2011, 08:53 PM
Find




Users browsing this thread: 1 Guest(s)