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 variable
Akos115 Offline
Member

Posts: 101
Threads: 14
Joined: Aug 2012
Reputation: 0
#1
Display variable

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

09-22-2012, 06:34 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#2
RE: Display variable

Just do:

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


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

and so on...

Trying is the first step to success.
09-22-2012, 06:42 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#3
RE: Display variable

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.

Tutorials: From Noob to Pro
09-22-2012, 07:25 PM
Website Find
Akos115 Offline
Member

Posts: 101
Threads: 14
Joined: Aug 2012
Reputation: 0
#4
RE: Display variable

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.

09-22-2012, 07:35 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#5
RE: Display variable

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

Trying is the first step to success.
09-22-2012, 07:44 PM
Find
Akos115 Offline
Member

Posts: 101
Threads: 14
Joined: Aug 2012
Reputation: 0
#6
RE: Display variable

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

09-22-2012, 07:50 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#7
RE: Display variable

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

Trying is the first step to success.
09-22-2012, 08:09 PM
Find
Akos115 Offline
Member

Posts: 101
Threads: 14
Joined: Aug 2012
Reputation: 0
#8
RE: Display variable

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

09-22-2012, 08:23 PM
Find
Robby Offline
Posting Freak

Posts: 2,549
Threads: 38
Joined: Jun 2009
Reputation: 47
#9
RE: Display variable

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

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-22-2012, 08:43 PM
Website Find
tasilvarPL Offline
Junior Member

Posts: 1
Threads: 0
Joined: Jul 2013
Reputation: 0
#10
RE: Display variable

(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
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.
07-29-2013, 05:21 PM
Find




Users browsing this thread: 1 Guest(s)