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
Display message only when looking at an entity
Robby Offline
Posting Freak

Posts: 2,549
Threads: 38
Joined: Jun 2009
Reputation: 47
#11
RE: Display message only when looking at an entity

More details please. "But it didn't work". How? Error? Or what?

Infrequently active. Don't expect an immediate response. Best to contact me at a different locale. If I create a thread, expect me to be quite active.
09-25-2012, 04:08 PM
Website Find
Akos115 Offline
Member

Posts: 101
Threads: 14
Joined: Aug 2012
Reputation: 0
#12
RE: Display message only when looking at an entity

No error message. There is no text displayed when looking at the entity.

09-25-2012, 04:10 PM
Find
Robby Offline
Posting Freak

Posts: 2,549
Threads: 38
Joined: Jun 2009
Reputation: 47
#13
RE: Display message only when looking at an entity

Maybe you had written the names in the script incorrectly? Maybe a tiny problem in the lang file? (Like, extra letter/symbol).

Otherwise, what you tried may not function. When it comes to "if" parts in scripting, I'm dud like an extinguished grenade.

Infrequently active. Don't expect an immediate response. Best to contact me at a different locale. If I create a thread, expect me to be quite active.
09-25-2012, 04:12 PM
Website Find
Akos115 Offline
Member

Posts: 101
Threads: 14
Joined: Aug 2012
Reputation: 0
#14
RE: Display message only when looking at an entity

I checked the names in the script, the .lang file and even in the game.They are all good :/

I figured it out... I made static objects for the items to make sure the player wont pick them up... STATIC OBJECTS, not entities, thats why it wont work... I feel so stupid now xD

(This post was last modified: 09-25-2012, 04:17 PM by Akos115.)
09-25-2012, 04:15 PM
Find
Vic7im Offline
Junior Member

Posts: 44
Threads: 9
Joined: Sep 2012
Reputation: 3
#15
RE: Display message only when looking at an entity

(09-25-2012, 04:10 PM)Akos115 Wrote: No error message. There is no text displayed when looking at the entity.

I had the same issue not long ago. The problem is either:

#1 .lang file error (even if you triple-check it, you may have overlooked it)
Fix: Create another entity with a text in it and see if it appears. If it doesn't then there's an error in the .lang file.

#2 Bad scripting.

I personally use on start stuff:

{
SetEntityPlayerLookAtCallback("Entity", "Function", true);

}




void Function (string &in asEntity, int alState)

{
if (alState == 1)
{
SetMessage("Category", "Text", 0);
}
}


which is basically the same thing you wrote.

If the second solution doesn't work there's an error in the .lang file, no way around that.
09-25-2012, 04:39 PM
Find
Akos115 Offline
Member

Posts: 101
Threads: 14
Joined: Aug 2012
Reputation: 0
#16
RE: Display message only when looking at an entity

(09-25-2012, 04:15 PM)Akos115 Wrote: I figured it out... I made static objects for the items to make sure the player wont pick them up... STATIC OBJECTS, not entities, thats why it wont work... I feel so stupid now xD
but thanks anyway

09-25-2012, 06:51 PM
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#17
RE: Display message only when looking at an entity

In the level editor, click at the desired entity you want to be seeked and then that displays message. Sorry if I don't explain myself well, my english isn't the best Sad

It's PlayerLookAtCallback, or something like that. Try it.

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
09-25-2012, 08:39 PM
Find




Users browsing this thread: 2 Guest(s)