Scripts / Displaying in-game text

Author
Message
Isisdragon
GameGuru TGC Backer
10
Years of Service
User Offline
Joined: 23rd Mar 2014
Location: FPSCR Forums (where else?)
Posted: 7th May 2014 04:49
Hey! I'm working on a new game, but I need to figure out how to show in-game text, otherwise the story behind the level doesn't make sense. Is there any way to make FPSCR display, like, "Hey, this is what is happening in the level"? Something tells me I'm asking a stupid question, but I can't find anything else that helps.

Fall awake
PM
Bolt Action Gaming
GameGuru Tool Maker
10
Years of Service
User Offline
Joined: 24th Oct 2013
Location: Harrisburg, PA (USA)
Posted: 7th May 2014 17:06
The "Prompt" command in lua will display text.
almightyhood
10
Years of Service
User Offline
Joined: 9th Oct 2013
Location:
Posted: 7th May 2014 17:19
this is true, but you will need to attach the script to something close by where you wanted the text to appear. and it will show everytime you are close to it I think, not sure if its the way of it 100% though myself.



with lua coming in on 07 more fully though perhaps story zones will be ready aswell? hope they are tbh..

evga GeForce gtx 750 ti boost2.0 2gb gddr5. win 8.1 quad core 4gb ram.
PM
tomjscott
User Banned
Posted: 7th May 2014 19:43
Story zones already work up to a point. Videos are not yet supported, but you can have a story zone trigger audio and display text prompts as well. You could add other LUA commands on a story zone trigger as well.
BarZaTTacKS
10
Years of Service
User Offline
Joined: 3rd Feb 2014
Location:
Posted: 12th May 2014 14:59
I can add on this question, how can I use the prompt command and also introduce a timer on how long the prompt goes up? I have one that it prompting the player to press E to pick up something but it is damaging to the inventory so I want it to prompt you with an alert that you just lost etc etc from your inventory. Right now it is so fast that the player can barely read through the prompt. Any ideas?
PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 17th May 2014 19:50 Edited at: 17th May 2014 19:51
use either avrams timer or os.time()



need to do 2 time checks (1 just once and the other constantly) and compare them, once the 2nd is bigger than the desired time you can then remove the prompt



using basic lua commands





using avrams addon you can do much more however so i would recommend checking it out https://bitbucket.org/Avram/fpsc-r-toolkit/wiki/aTimer

life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
BarZaTTacKS
10
Years of Service
User Offline
Joined: 3rd Feb 2014
Location:
Posted: 21st May 2014 14:25
@smallg I would as I have come across this 2 times now (avrams timer) but I just cannot figure out how to use it.
PM
almightyhood
10
Years of Service
User Offline
Joined: 9th Oct 2013
Location:
Posted: 21st May 2014 17:48
the following is fromlee, in my kill or be killed competition thread.



"There are likely some script changes required to remove the dependence on the 'Avram' LUA module which is not currently tested for V1.007."



having this mentioned might mean it wont work in 07 anyways for abit m8, maybe not use it for the time being?.



but what is troubling you with working it m8?

evga GeForce gtx 750 ti boost2.0 2gb gddr5. win 8.1 quad core 4gb ram.
PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 21st May 2014 19:13
as almightyhood says avrams code will need to be adjusted for 1.007 it seems but the code i gave above will work for a standard prompt anyway, did you get it working?



plus there will be a timer command as standard in 1.007 so i would wait and see how easy that is to use now as it wont be long.

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-05-06 04:15:22
Your offset time is: 2024-05-06 04:15:22