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
How to isplays a text on the player's screen?
Janni1234 Offline
Member

Posts: 134
Threads: 24
Joined: Jan 2011
Reputation: 1
#1
How to isplays a text on the player's screen?

I don't know how to display a text on the screen.Can somebody tell me how? Huh
Sorry I mean : " How to display a text on the players screen"
(This post was last modified: 07-08-2011, 06:39 PM by Janni1234.)
07-08-2011, 06:38 PM
Find
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#2
RE: How to isplays a text on the player's screen?

SetMessage("CategoryName", "TextName", [TimeItIsDisplayed]);

Example:

SetMessage("Hints", "Hint01", 3);

<LANGUAGE>
<CATEGORY Name="Hints">
<Entry Name="Hint01">This is a message.</Entry>
</CATEGORY>
</LANGUAGE>

(This post was last modified: 07-08-2011, 06:52 PM by Kyle.)
07-08-2011, 06:51 PM
Find
Janni1234 Offline
Member

Posts: 134
Threads: 24
Joined: Jan 2011
Reputation: 1
#3
RE: How to isplays a text on the player's screen?

Okay thank you.Where is your "Hint01" in the .lang file?
ah ok.thanks
It doesn't work.He says : "unexpected end of file" in row 120

here is my script :
void OnStart()
{
AddEntityCollideCallback("Player", "spider1", "spider1", true, 1);
AddEntityCollideCallback("Player", "spider2", "spider2", true, 1);
AddEntityCollideCallback("Player", "spider3", "spider3", true, 1);
AddEntityCollideCallback("Player", "hm", "hm", true, 1);
AddEntityCollideCallback("Player", "active", "active", true, 1);
AddEntityCollideCallback("Player", "ball", "ball", true, 1);
AddEntityCollideCallback("Player", "what", "what", true, 1);
AddUseItemCallback("", "string_pile_1", "cannon_1", "StringOnCannon", true);
}


void spider1(string &in asParent , string &in asChild , int alState)
{
PlaySoundAtEntity("", "spider_step.snt", "Player", 0, false);
}

void spider2(string &in asParent , string &in asChild , int alState)
{
PlaySoundAtEntity("Player", "spider_die.snt", "stone_med01_brown_1", 0, false);
}

void spider3(string &in asParent , string &in asChild , int alState)
{
PlaySoundAtEntity("", "spider_hurt.snt", "Player", 0, false);
PlaySoundAtEntity("", "roach_idle.snt", "Player", 0, false);
}

void hm(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("spider_1", true);
SetEntityActive("spider_2", true);
PlaySoundAtEntity("", "react_breath.snt", "Player", 0, false);
SetEntityActive("active", true);
}


void active(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("spider_3", true);
SetEntityActive("spider_4", true);
}

void interact_ball(string &in asEntity)
{
SetEntityActive("ball", true);
}


void ball(string &in asParent , string &in asChild , int alState)
{
StartPlayerLookAt("look", 4.0, 1.0f, "");
PlaySoundAtEntity("", "13_ignite.snt", "Player", 0, false);
AddTimer("Timer", 0.5f, "lol");

}

void lol(string &in asTimer)
{
StopPlayerLookAt();
}

void StringOnCannon(string &in asItem, string &in asEntity)
{
StartPlayerLookAt("string_1", 2.0, 3.0f, "");
PlaySoundAtEntity("", "12_make_drill.snt", "Player", 0, false);
AddTimer("Timer", 1.0f, "stop");
RemoveItem(asItem);
SetEntityActive("candle_floor_3", true);
AddTimer("Timer", 1.0f, "boom");
}

void stop(string &in asTimer)
{
StopPlayerLookAt();
}



void boom(string &in asTimer)
{
PlaySoundAtEntity("", "12_epoxy_blow.snt", "Player", 0, false);
AddTimer("Timer", 3.0f, "boomdust");
}

void boomdust(string &in asTimer)
{
CreateParticleSystemAtEntity("", "ps_break_pottery.ps", "look", false);
FadeLightTo("PointLight_4", 1.0f, 0.809f, 0.172f, 1.0f, -1.0f, 0.2f);
AddTimer("Timer", 0.5f, "fall");
AddTimer("Timer", 0.2f, "light");
}

void light(string &in asTimer)
{
FadeLightTo("PointLight_4", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 0.2f);
}


void fall(string &in asTimer)
{
SetEntityActive("prison_broken_1", true);
SetEntityActive("prison_3", false);
SetEntityActive("wooden_board03_5", true);
SetEntityActive("wooden_board03_6", true);
SetEntityActive("wooden_board03_3", true);
SetEntityActive("wooden_board03_4", true);
SetEntityActive("wooden_board03_7", true);
CreateParticleSystemAtEntity("", "ps_break_cavein.ps", "dust", false);
PlaySoundAtEntity("", "hit_wood.snt", "Player", 0, false);
PlaySoundAtEntity("", "break_wood.snt", "Player", 0, false);
}


void what(string &in asParent , string &in asChild , int alState)
{
SetMessage("Hints", "Hint01", 2.0f");
}
(This post was last modified: 07-08-2011, 07:50 PM by Janni1234.)
07-08-2011, 07:02 PM
Find
Janni1234 Offline
Member

Posts: 134
Threads: 24
Joined: Jan 2011
Reputation: 1
#4
RE: How to isplays a text on the player's screen?

what is wrong? please answere Sad
07-08-2011, 09:17 PM
Find
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#5
RE: How to isplays a text on the player's screen?

The thing below is wrong.

void what(string &in asParent , string &in asChild , int alState)
{
SetMessage("Hints", "Hint01", 2.0f");
}

It should be:

void what(string &in asParent , string &in asChild , int alState)
{
SetMessage("Hints", "Hint01", 2.0f);
}

07-08-2011, 09:23 PM
Find
Janni1234 Offline
Member

Posts: 134
Threads: 24
Joined: Jan 2011
Reputation: 1
#6
RE: How to isplays a text on the player's screen?

ah i see.thx.oh god i am...forget it xD
07-08-2011, 09:28 PM
Find




Users browsing this thread: 1 Guest(s)