Frictional Games Forum (read-only)
Display variable - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Display variable (/thread-18455.html)



Display variable - Akos115 - 09-22-2012

Is there a way to display a local variable in-game? For expample when interacting with an entity, or in the inventory screen?


RE: Display variable - FlawlessHappiness - 09-22-2012

Just do:

if(GetLocalVarInt("Variable") == 1)
{
SetMessage("Messages", "Variable_1", 0);
}


if(GetLocalVarInt("Variable") == 2)
{
SetMessage("Messages", "Variable_2", 0);
}

and so on...


RE: Display variable - Your Computer - 09-22-2012

Do you want to display the message to the player or to you, the developer? If player, beecake's code is one way of doing it. If to yourself, use AddDebugMessage.


RE: Display variable - Akos115 - 09-22-2012

I want to make the player see it, but i think i will have to do it a way like beecake said. The only problem is that the variable will go on from like 1 to 100.


RE: Display variable - FlawlessHappiness - 09-22-2012

And you want each number? What about doing it with percent? Like 10% and 20%


RE: Display variable - Akos115 - 09-22-2012

That's a good idea, but I can't use it, because I'm going to make shops with thalers...


RE: Display variable - FlawlessHappiness - 09-22-2012

Then it gets pretty complex... But yes then i guess you would have to make 100 messages...


RE: Display variable - Akos115 - 09-22-2012

or more... i guess i will do that then xD


RE: Display variable - Robby - 09-22-2012

As long as that may take, it will be worth it.


RE: Display variable - tasilvarPL - 07-29-2013

(09-22-2012, 06:42 PM)BeeKayK Wrote: Just do:

if(GetLocalVarInt("Variable") == 1)
{
SetMessage("Messages", "Variable_1", 0);
}


if(GetLocalVarInt("Variable") == 2)
{
SetMessage("Messages", "Variable_2", 0);
}

and so on...

hm, okej - and how do it, that i can connect variables with any string ?
I did
Code:
SetMessage("Skrytki","Odkryto"+GetGlobalVarInt("OdkryteSkrytki")+GetGlobalVarString("Separator")+GetGlobalVarInt("MaxSkrytek"), 3);

but this doesnt work :/
Please help me, and sorry for my english Smile
btw. i want display this connect strings by collided in area script.