Frictional Games Forum (read-only)

Full Version: How to make a message appear by clicking on something?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Just what the title says.

When the player touches an entity, static object or anything, it displays a message. How do you do that, is it hard to do it. because I can't find a way to do it, and tell me what I have to code or write in the lang file or in the level editor. thnks
Without being mean mate, I think you should overlook the Engine Scripts page a little bit more. While we are here to help, we cannot always just give you code. Look through Amnesia, other people's Custom Stories, the wiki tutorials and previous forum posts. You have to learn what to do as well, not just rely on everybody else.

Regardless:
PHP Code:
void OnStart()
{
SetEntityPlayerInteractCallback("""interacted"false);
}

void interacted("name_of_entity_in_Level_Editor")
{
SetMessage(stringasTextCategorystringasTextEntry0.0f);

(I think that works. Haven't tested it, but followed correct terms in setting it up)

You need to supply the TextCategory and TextEntry, according to your lang file, and change the name_of_entity_in_Level_Editor to the name of what you're interacting with.
(02-03-2014, 03:10 PM)Romulator Wrote: [ -> ]Without being mean mate, I think you should overlook the Engine Scripts page a little bit more. While we are here to help, we cannot always just give you code. Look through Amnesia, other people's Custom Stories, the wiki tutorials and previous forum posts. You have to learn what to do as well, not just rely on everybody else.

I agree on this. Your posts are swarming this forum and many of your questions have already been answered in other threads. Make sure to use the wiki and help yourself before resorting to the forum. If you really need that much help, then get a mentor or something with enough technical capabilities.

Ingedoom / Simon
yeah you're right. I do post a lot of threads, even I say to myself why. let me give you reasons why. well first I am a beginner into coding, second I am fast with my custom story because when I have ideas I want to do them quickly before I forget them. that's why I post lots of threads. Thirdly I'm sorry for posting lots of threads, I will look in the wiki and etc before I post a thread. Ok? Blush thanks and the part where you said "get a mentor or something with enough technical capabilities." it kinda made me sad. well I do deserve it anyway, but I will probably learn more coding soon, without doing that much threads Tongue
If you look closer at my previous post, from your thread about hatch problem, there is the same thing you want now. Read my previous post again and you should know how to do it, and please, stop making so many threads, otherwise you can get even banned for spaming.
(02-03-2014, 05:15 PM)Lazzer Wrote: [ -> ]If you look closer at my previous post, from your thread about hatch problem, there is the same thing you want now. Read my previous post again and you should know how to do it, and please, stop making so many threads, otherwise you can get even banned for spaming.

I dont think he will get banned, if he just asks questions... He just wants to learn how to do things, i got that feeling too as im new (not to the games etc) to Leveling and scripting Tongue

He might get banned for spamming senseless off topic threads as: (Subjects)
Lololololol
lfwjpkgjw
qfwgwgwr
qgqh

Maybe that but i dont think someone will ban him when he is only asking questions :L
At least not without a warning.
(02-03-2014, 05:18 PM)MasterPig Wrote: [ -> ]
(02-03-2014, 05:15 PM)Lazzer Wrote: [ -> ]If you look closer at my previous post, from your thread about hatch problem, there is the same thing you want now. Read my previous post again and you should know how to do it, and please, stop making so many threads, otherwise you can get even banned for spaming.

I dont think he will get banned, if he just asks questions... He just wants to learn how to do things, i got that feeling too as im new (not to the games etc) to Leveling and scripting Tongue

He might get banned for spamming senseless off topic threads as: (Subjects)
Lololololol
lfwjpkgjw
qfwgwgwr
qgqh

Maybe that but i dont think someone will ban him when he is only asking questions :L
At least not without a warning.

Spaming is spaming. He can teach himself these things from wiki or youtube tutorials as well. This sub-forum is of course here to post questions/problems, but keep in mind that you shouldn't post too much obvious things.
Ok I promise, I'm sorry all I wanted is just to learn more into scripting and stuff, I didn't know I made 2 same threads. but pls forgive me Sad
(02-03-2014, 06:48 PM)Badcat5550 Wrote: [ -> ]Ok I promise, I'm sorry all I wanted is just to learn more into scripting and stuff, I didn't know I made 2 same threads. but pls forgive me Sad

Nobody is blaiming you, all of us here were beginners too. You just have to learn basics of the scripting, otherwise you won't understand nothing of it and keep in mind nobody will do all the scripts for you.

You really should take a look at the tutorials on youtube, if I recall correctlly this guy down here makes some cool tutorials with script pasted in the description, so if you won't script you can copy and paste that.

Spoiler below!

However in my opinion you really should try making some simple scripts and then go to some more difficult ones, it improves your logic, thinking and stuff Smile
I can also help you with problems via skype, if you want to.
thanks for the information Smile I'll try my best, my Skype name is Badcat5550
Pages: 1 2