Scripts / Help with toggling text

Author
Message
Pink Panther
14
Years of Service
User Offline
Joined: 1st Feb 2010
Location:
Posted: 12th Jun 2019 17:50
Using this script for an in game project. It works fine the way it is but I was trying to get it so pressing "y" or "n" would keep the text on screen until they are pressed again. I have been studying the scripts in the forum that deal with this type of thing (toggling huds, text, etc.) but I just can't seem to get my brain to figure it out and make it work in this script. Can you possibly show me what I need to add to get it right? Any help would be greatly appreciated!

PM
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 12th Jun 2019 18:30 Edited at: 12th Jun 2019 18:32
would a timer be better?

if you don't want it to reset after 2seconds change line 33 ( tstate = 0) to something like ( tstate = 3) or Destroy(e)
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
Pink Panther
14
Years of Service
User Offline
Joined: 1st Feb 2010
Location:
Posted: 12th Jun 2019 18:47
Wow smallg! Thanks for the fast reply. That works great! Exactly what I wanted. Is there a way to add a sound effect for each result?
PM
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 13th Jun 2019 09:44
sure, just put PlaySound(e,#) in this part
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
Pink Panther
14
Years of Service
User Offline
Joined: 1st Feb 2010
Location:
Posted: 14th Jun 2019 15:51
Perfect! Thank you so much!
PM

Login to post a reply

Server time is: 2024-12-22 14:47:19
Your offset time is: 2024-12-22 14:47:19