Scripts / Prompts disappear too fast

Author
Message
tomjscott
User Banned
Posted: 5th May 2014 06:24
I'm doing some custom storyinzone scripts and am adding text prompts, but they only appear for a fraction of a second and then disappear. Here is an example.







At first I had the prompt after the sound, but then thought it disappeared quickly because the object was getting destroyed immediately afterwards. I thought putting it before the sound playing would cause it to pause as long as the sound was playing. However, I suspect that sound playing gets done async anyway. So, is there any way to make sure the prompt stays on screen longer?
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 5th May 2014 13:45
using a timer works pretty well for now.



would like to see an updated prompt in future with a varible time function

i.e. Prompt("text here" , 2) would display the text for 2 seconds

although i guess prompts will be ignored completely in future for real text interface?

life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
tomjscott
User Banned
Posted: 5th May 2014 16:14
I have almost no experience with scripting in Reloaded and even less in the original FPS Creator. I read somewhere else that the only functions available right now are found in the global.lua file and I don't see a timer function there. If you have details on how to use a timer then I would be grateful for that.
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 5th May 2014 21:49
check out this from avram https://bitbucket.org/Avram/fpsc-r-toolkit/wiki/aTimer



the download is at the bottom of the main wiki page or here https://bitbucket.org/Avram/fpsc-r-toolkit/wiki/Installation



it's very simple to use if you follow his examples as guides

life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
tomjscott
User Banned
Posted: 5th May 2014 22:16
Thanks. I actually found his thread on farming this morning and saw the timer stuff. I guess I need to look at basic Lua functionality a bit more as there is obviously a lot more I can do in just pure code than I imagined.
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 24th May 2014 16:48
You don't even need a timer really. Just make the text appear within a certain distance of the trigger object. That is all I did on my farming scripts to get the info to display until you moved away or clicked.



SPECS: Q6600 CPU. Nvidia 260GTX. 8 Gig Memory. Win 7.
tomjscott
User Banned
Posted: 24th May 2014 16:59
Yep. My problem was that I put the prompt in a story zone script, which has a destroy call. So the story script triggers, but then just gets destroyed and goes away.

System Specs: OS - Windows 7 Home Premium 64-bit SP1, CPU - AMD Phenom II X4 945, 3.0Ghz, RAM - 8Gb DDR3, GFX Card - 2048MB NVIDIA GeForce GT 640, FPSC-R Version - Beta 1.006
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 24th May 2014 20:29
Quote: "You don't even need a timer really. Just make the text appear within a certain distance of the trigger object. That is all I did on my farming scripts to get the info to display until you moved away or clicked."




yes and no, it's ok if you only want 1 line of text but what if you need more?

or if like tomjscott says, you wanted to destroy the entity?

it's good to learn using a timer because it can be very useful for many things

life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11

Login to post a reply

Server time is: 2024-04-19 23:11:08
Your offset time is: 2024-04-19 23:11:08