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
Text code
Author Message
TheDavenia Offline
Member

Posts: 223
Joined: Jun 2011
Reputation: 0
Post: #1
Text code
How do i make it so if i run into a certain area a text pops up on my screen? Huh
Please help

Thanks,
TheDavenia

Current Project: Nightmare's End(Project Director, Scripter, boss >:D)
06-28-2011 09:02 PM
Find all posts by this user Quote this message in a reply
xtron Offline
Senior Member

Posts: 402
Joined: May 2011
Reputation: 2
Post: #2
RE: Text code
in your script file

void OnStart()
{
AddEntityCollideCallback("Player", "AREA", "FUNCTION", true, 1);
}

void FUNCTION(string &in asEntity)
{
SetMessage("LANG", "ENTITY", 5.0f);
}

extra_lang
<CATEGORY Name="LANG">
<Entry Name="ENTITY">Type the text here you want to be shown</Entry>
</CATEGORY>

change it to your benefit ;D

[Image: 44917299.jpg]Dubstep <3
(This post was last modified: 06-28-2011 09:24 PM by xtron.)
06-28-2011 09:23 PM
Find all posts by this user Quote this message in a reply
TheDavenia Offline
Member

Posts: 223
Joined: Jun 2011
Reputation: 0
Post: #3
RE: Text code
(06-28-2011 09:23 PM)xtron Wrote:  in your script file

void OnStart()
{
AddEntityCollideCallback("Player", "AREA", "FUNCTION", true, 1);
}

void FUNCTION(string &in asEntity)
{
SetMessage("LANG", "ENTITY", 5.0f);
}

extra_lang
<CATEGORY Name="LANG">
<Entry Name="ENTITY">Type the text here you want to be shown</Entry>
</CATEGORY>

change it to your benefit ;D

Thx

Current Project: Nightmare's End(Project Director, Scripter, boss >:D)
06-28-2011 09:25 PM
Find all posts by this user Quote this message in a reply
SLAMnesia Offline
Member

Posts: 94
Joined: May 2011
Reputation: 0
Post: #4
RE: Text code
I'm having problems with a similar issue,
how do I make it so when I look at an entity it displays a message? and I want it to always work when looking at the entity and not only once.
here's my script:
my .hps file
void OnStart ()
{
SetEntityPlayerLookAtCallback("shirt1", "LookingShirtFunc1", false);
}

void LookingShirtFunc1(string &in entity, int alState)
{
SetMessage("Messages", "Message01", 3);
}

my .lang file
<LANGUAGE>
    <CATEGORY Name="Messages">
        <Entry Name="Message01">Hello world!</Entry>
    </CATEGORY>
</LANGUAGE>
(This post was last modified: 06-29-2011 09:36 PM by SLAMnesia.)
06-29-2011 09:27 PM
Find all posts by this user Quote this message in a reply
TheDavenia Offline
Member

Posts: 223
Joined: Jun 2011
Reputation: 0
Post: #5
RE: Text code
(06-29-2011 09:27 PM)SLAMnesia Wrote:  I'm having problems with a similar issue,
how do I make it so when I look at an entity it displays a message? and I want it to always work when looking at the entity and not only once.
here's my script:
my .hps file
void OnStart ()
{
SetEntityPlayerLookAtCallback("shirt1", "LookingShirtFunc1", false);
}

void LookingShirtFunc1(string &in entity, int alState)
{
SetMessage("Messages", "Message01", 3);
}

my .lang file
<LANGUAGE>
    <CATEGORY Name="Messages">
        <Entry Name="Message01">Hello world!</Entry>
    </CATEGORY>
</LANGUAGE>

I don't know sorry just post a new thread and someone will help you Big Grin

Current Project: Nightmare's End(Project Director, Scripter, boss >:D)
06-30-2011 12:28 AM
Find all posts by this user Quote this message in a reply
Post Reply 




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