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
Script Help Text on screen when looking at a certain model
goodcap Offline
Member

Posts: 193
Threads: 112
Joined: Jun 2012
Reputation: 3
#1
Text on screen when looking at a certain model

I was wondering how I make it that when the player clicks/interacts on/with a pile of barrels a message appears that says: ''This barrel is brown" or whatever. Or a cardreader that says: "This cardreader looks old and useless" when you click on it


Thanks
(This post was last modified: 05-05-2015, 06:44 PM by goodcap.)
05-05-2015, 06:42 PM
Find
Amnesiaplayer Offline
Senior Member

Posts: 539
Threads: 105
Joined: Jun 2014
Reputation: 0
#2
RE: Text on screen when looking at a certain model

I'm not sure, but I think I know how to do this.

Click on the Object you want, and then go to "entity" tab.
Then Write something like, "Message1" in the PlayerInteractCallback.
Then do it like this in your script :

PHP Code: (Select All)
void Message1(string &in asEntity)
{
SetMessage("Messages"">YourMessagename<"1);


EDIT: the 1 at the end of setmessage means how long the text will stay.
(also, don't forgot to use your lang file)

Hope this helped.
Tell me if it worked Smile
(This post was last modified: 05-05-2015, 07:05 PM by Amnesiaplayer.)
05-05-2015, 07:04 PM
Find
goodcap Offline
Member

Posts: 193
Threads: 112
Joined: Jun 2012
Reputation: 3
#3
RE: Text on screen when looking at a certain model

(05-05-2015, 07:04 PM)Amnesiaplayer Wrote: I'm not sure, but I think I know how to do this.

Click on the Object you want, and then go to "entity" tab.
Then Write something like, "Message1" in the PlayerInteractCallback.
Then do it like this in your script :

PHP Code: (Select All)
void Message1(string &in asEntity)
{
SetMessage("Messages"">YourMessagename<"1);


EDIT: the 1 at the end of setmessage means how long the text will stay.
(also, don't forgot to use your lang file)

Hope this helped.
Tell me if it worked Smile


it worked. Thanks bud Smile
(This post was last modified: 05-05-2015, 07:16 PM by goodcap.)
05-05-2015, 07:12 PM
Find
Amnesiaplayer Offline
Senior Member

Posts: 539
Threads: 105
Joined: Jun 2014
Reputation: 0
#4
RE: Text on screen when looking at a certain model

No problem Smile
05-05-2015, 07:19 PM
Find




Users browsing this thread: 1 Guest(s)