steadyfi Posted March 8, 2015 Share Posted March 8, 2015 Hello I was wondering if I can refresh a IF statement in a function that is triggered ONE TIME. For example a GUI. I draw the first tab, but the second requires a getElementData == true, and I can change that from the first tab. How can I make it recheck the elementData without re-triggering the function ? Example: function example() outputChatBox("This is triggered without any conditions") --more code that can change the element data if getElementData(localPlayer, "canITriggerIt") == true then outputChatBox("Horay, i was triggered") end end It's a GUI with 2 tabs, I don't want to re-trigger the function to recheck the getElementData Thank you Link to comment
steadyfi Posted March 8, 2015 Author Share Posted March 8, 2015 onClientElementDataChange That is not what I want but ok. I was asking if I can refresh that IF statement even if I DON'T RE-TRIGGER the function. Like i said, it's a GUI and I don't want to reopen it Link to comment
JR10 Posted March 8, 2015 Share Posted March 8, 2015 That is exactly what you need. You can't "refresh" a statement. onClientElementDataChange will be triggered whenever an element's data change. You can detect when canITriggerIt gets changed and recheck the value. Link to comment
steadyfi Posted March 8, 2015 Author Share Posted March 8, 2015 That is exactly what you need. You can't "refresh" a statement. onClientElementDataChange will be triggered whenever an element's data change. You can detect when canITriggerIt gets changed and recheck the value. Alright, thanks Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now