Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / Pickup Script- Modify the hud display

Author
Message
BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 21st Nov 2009 22:02
I am trying to modify a simple script- the pickup script. For some reason I am stumped to how to delay the time from when the hud comes up to when it fades out. I've created a work-around, where I have modified the pickup script to not display a hud, and set a triggerzone to display the actual hud I want to use. However, I'd rather do it in one script, rather than 2 (one in entity, one in trigger).

The pickup script I use is:



I've tried to place a timer, thinking it should go between the "hudshow" and "hudfadeout", but it keeps the hud up. It's probably something simple, but I'd appreciate some input to how you can delay the time from when the hud shows and when it fades with the code I am using.

Cheers

Mike
Hockeykid
DBPro Tool Maker
17
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 21st Nov 2009 22:59


^ there you go, by the way what mod are you using? (so i can switch out the global timer for an etimer)

BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 21st Nov 2009 23:20 Edited at: 21st Nov 2009 23:24
Thanks for the reply hockeykid. That's what I had before, except I had my timer set for 5000 since the hud had a piece of info the player had to read. The hud still shows even when I pick up the entity and leave the room. I tried adding the "hudfadeout=dossier1prompt,destroy" but that did nothing to the hud.

I currently use multiple mods. I've designed an application that allows me to swap the mods I want to use (Fenix, RPG, Project Blue, Project Green) and we're still on FPSC v1.1.5. On this particular game development, I'm using Project Blue mod. On another game it will be Fenix. I was hoping to have a "generic script" to use no matter which mod I used.

Cheers

Mike
Hockeykid
DBPro Tool Maker
17
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 22nd Nov 2009 02:06
Quote: "Thanks for the reply hockeykid. That's what I had before, except I had my timer set for 5000 since the hud had a piece of info the player had to read. The hud still shows even when I pick up the entity and leave the room. I tried adding the "hudfadeout=dossier1prompt,destroy" but that did nothing to the hud."


Its probably something with the way hudfadeout was coded your best option is to use hudunshow.

BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 22nd Nov 2009 03:43
Yes I had tried that too. Did not work as I had hoped.

I appreciate your help my friend, and for now we will stay with the work-around: one script for pickup with no hud, and a trigger showing the hud we want displayed. This way it's guaranteed it will work regardless of what mod is used.

Cheers

Mike
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 22nd Nov 2009 22:55



Would this work? It basically shows the HUD after being picked up and fades out when the player walks away, then never shows the HUD again.


The one and only,


BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 23rd Nov 2009 00:36 Edited at: 23rd Nov 2009 00:38
It does work Ply, as did my original script, but the hud comes up and a second later fades out, so you have to read fast. What Cathy and I were attempting to do is "delay" the time from when the hud comes up and when it fades out. This way if we had a bit of info, then we could control how much time the hud would be up. Unfortunately, your script, mine, or using a timer did nothing to put a delay in.

Howerver, we did find a good way to do it, not too sure what you think of this. We have modified the script so that the hud comes up and once the player "takes" the document or item with the "T" key, the item is picked up and the hud disappears. We've also coded it so the hud will not display if the player returns to that area. It was especially good for Cathy's game , as it has some mazes and the chance of passing by the area where you picked up an entity was great and we did not want the player confused if that same hud came up again with no entity around.

The code we use now is:



This is useful in a variety of ways for us, whether used when picking up an entity (such as a dossier, map, etc) or even a weapon. It also works perfect if we swap mods from Project Blue to RPG, Fenix, or Project Green mods.

I do appreciate the time you and hockeykid gave us to solve this. Sometimes it helps me to post the issue and receive suggestions and gets me to think of other alternatives/options outside of the box.

Cheers

Mike
Nickydude
Retired Moderator
18
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Look outside...
Posted: 23rd Nov 2009 14:54
Try changing the plrdistfurther=40 to a larger number and see what happens (I'm just guessing here as I'm new to scripting).

French gui
20
Years of Service
User Offline
Joined: 11th May 2004
Location: France
Posted: 23rd Nov 2009 15:50
What's the point of this:

:state=20,plrdistfurther=40:hudunshow=dossier1prompt,state=20,state=10
BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 23rd Nov 2009 16:58 Edited at: 23rd Nov 2009 17:00
@French gui

Thanks for pointing that out. It was a typo on my part. The script should be:



@ Nickydude

We tried that too and the hud still came up and then disappeared. Both Cathy and I figured it was better to have to press a key to pick up an item, and the hud would remain until the key was pressed which allowed the player to read it.

Cheers

Mike

Login to post a reply

Server time is: 2024-11-25 05:47:23
Your offset time is: 2024-11-25 05:47:23