Frictional Games Forum (read-only)

Full Version: Display variable
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is there a way to display a local variable in-game? For expample when interacting with an entity, or in the inventory screen?
Just do:

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


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

and so on...
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.
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.
And you want each number? What about doing it with percent? Like 10% and 20%
That's a good idea, but I can't use it, because I'm going to make shops with thalers...
Then it gets pretty complex... But yes then i guess you would have to make 100 messages...
or more... i guess i will do that then xD
As long as that may take, it will be worth it.
(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.