Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Quick script func!
Author Message
SLAMnesia Offline
Member

Posts: 94
Joined: May 2011
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
Kyle Offline
Posting Freak

Posts: 910
Joined: Sep 2010
Reputation: 7
Post: #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 all posts by this user Quote this message in a reply
SLAMnesia Offline
Member

Posts: 94
Joined: May 2011
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)