Thanks guys! 3com the only thing I was missing that was different from my code really was the "else" statement. I'm quite new to LUA didn't even consider it.
EDIT: cant seem to get it to work. Testing with prompts (just for testing purposes before checking out text or sprites). It returns a syntax error for the "g_KeyPressE"
isOpen = 0
If g_KeyPressE == 0 and isOpen == 0 then
Prompt("SHOW SPRITE.")
isOpen = 1
elseIf g_KeyPressE == 0 and isOpen == 1 then
Prompt("HIDE STATUS.")
isOpen = 0 -- if you want to show the same text again - otherwiswe, isOpen = 2
end
I should note I have a working sprite system with text floating on top and various parts of the sprite. I do have the sprites off screen and pasted in, when required in view. Here is a bit of a test of that:
EDIT: Belidos your example works pretty good. Now I just have to understand how you did it lol
EDIT2: Everything is working great with your example codes blended with my own. I have another question that is kind of related. How do you actually disable more than one variable and more than one text string inside a text element?
Example:
TextColor(5,10,3,"Experience:" .. experience,200,200,200)
Displays
Experience: 0
How do I go about displaying something like:
Experience: 0/100
with using "experience" and "maxexperience" variables?
This doesn't work:
TextColor(5,10,3,"Experience:" .. experience "/" .. maxexperience,200,200,200)