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 / Proximity HUD Issue

Author
Message
Leon Kennedy
16
Years of Service
User Offline
Joined: 7th Sep 2008
Location: Neither here nor there
Posted: 24th Apr 2009 02:02
Ok, so I have this script that is supposed to display a hud when the player is within 25 of an entity that I have defined as dynamic. The HUD is in the right folder, and it is named tvnopower.dds. The problem is that when I test the level, the HUD doesn't show at all, no matter how close I am to the entity. The script:


Can someone tell me what I'm possibly doing wrong that the HUD isn't displaying? All the HUD is is a simple text image (DDS) that states that the power is out. I can stand directly on the entity and it still doesn't display.

Anyone?

Priest of the Church of Joe Wood
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 24th Apr 2009 05:54
Use a larger distance value. My educated guess here is that the player is NEVER that close to the entity. I usually use a value of 40-70 for being in an entity's "face"


The one and only,


Leon Kennedy
16
Years of Service
User Offline
Joined: 7th Sep 2008
Location: Neither here nor there
Posted: 24th Apr 2009 13:44
That worked. Thanks, man - I owe you one.

Priest of the Church of Joe Wood
john schwarcz
User Banned
Posted: 24th Apr 2009 21:59
wow, nice idea! would you allow me to use that script too ?

shadow666
Leon Kennedy
16
Years of Service
User Offline
Joined: 7th Sep 2008
Location: Neither here nor there
Posted: 25th Apr 2009 04:03
Actually, John, it's going in my level design tutorial. Once I get that done, it will be free to the whole community.

But it's posted above, so yeah - go ahead.

Priest of the Church of Joe Wood
meteorite
18
Years of Service
User Offline
Joined: 19th Nov 2006
Location: The Capital Wasteland
Posted: 25th Apr 2009 15:18
The reason for using larger distances is that it reads from the center of the object to the players center

"I can't imagine what this place would have been like if I hadn't found you here." - BJ Hunnicutt
Leon Kennedy
16
Years of Service
User Offline
Joined: 7th Sep 2008
Location: Neither here nor there
Posted: 25th Apr 2009 16:28
Yeah, that's one of those simple things that I know but just brain faded on.

Priest of the Church of Joe Wood
john schwarcz
User Banned
Posted: 26th Apr 2009 04:36
thanks so much is it scripted to go away eventually?

shadow666
Leon Kennedy
16
Years of Service
User Offline
Joined: 7th Sep 2008
Location: Neither here nor there
Posted: 26th Apr 2009 17:47
Ummm, yeah. That's actually the idea behind it. When you get close to the object, the HUD appears. When you move away from the object, the HUD disappears.

Priest of the Church of Joe Wood
john schwarcz
User Banned
Posted: 26th Apr 2009 20:23
sweet thanks, what if the object is destroyed

shadow666
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 26th Apr 2009 21:26
If the object is destroyed, then it doesn't exactly have a script anymore, does it?


The one and only,


john schwarcz
User Banned
Posted: 27th Apr 2009 00:42
thanks (i should of realized )

shadow666
freak of nature 64
15
Years of Service
User Offline
Joined: 19th Jan 2009
Location: Look in your car...
Posted: 27th Apr 2009 01:23
The thing with the first problem is 100 units=1 segment and so when your a quarter of a segment away the engine freaks out. That is my guess.

fgadzsv bla bla bla
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 27th Apr 2009 04:23
@freak of nature 64:

The problem has already been resolved. The engine does not "freak out" because of the distance he's checking for. The problem resided in the fact that the player cannot get that close to the entity and so a higher distance value was needed.


The one and only,


john schwarcz
User Banned
Posted: 27th Apr 2009 04:46
is there a way we could change this script to display multiple huds, giving the illusion of animated huds

shadow666
Red Eye
16
Years of Service
User Offline
Joined: 15th Oct 2008
Location:
Posted: 27th Apr 2009 12:00
Quote: "is there a way we could change this script to display multiple huds, giving the illusion of animated huds"


yes,

i made once a animated menu,, use search and you will find out


Leon Kennedy
16
Years of Service
User Offline
Joined: 7th Sep 2008
Location: Neither here nor there
Posted: 27th Apr 2009 14:50
Quote: "is there a way we could change this script to display multiple huds, giving the illusion of animated huds"

If you are asking about displaying multiple HUDs at one time, the answer is yes, you can do that.

If you are asking about displaying one HUD the first time you get to the object and then a different one the next time you walk up to the object, then the answer is yes.

Which question are you asking?

Priest of the Church of Joe Wood
john schwarcz
User Banned
Posted: 27th Apr 2009 17:16
the one where you are close to the object once and it shows an animated hud and guys!!!! someone is making an animated hud maker!!!

shadow666
Leon Kennedy
16
Years of Service
User Offline
Joined: 7th Sep 2008
Location: Neither here nor there
Posted: 27th Apr 2009 17:35
Quote: "someone is making an animated hud maker!!! "

Yes, John, we know.

@mods: This topic can be locked as the answer has been received and the script now functions properly.

Priest of the Church of Joe Wood
john schwarcz
User Banned
Posted: 27th Apr 2009 20:15
thanks for you script leon
goodbye thread

shadow666
john schwarcz
User Banned
Posted: 1st May 2009 04:22
hey i have a question lol i know im a lttle late, but , can this be applied to a charecter ? if so , how?

shadow666
Leon Kennedy
16
Years of Service
User Offline
Joined: 7th Sep 2008
Location: Neither here nor there
Posted: 1st May 2009 15:03
Quote: "can this be applied to a charecter "

Well, technically, you could take this script and place it on any entity, to include characters and enemies. The only problem with this is that you would have to have this work in conjunction with any other scripts for that character to have them still walk, talk, fight, whatever, in addition to performing the actions of this script.

Priest of the Church of Joe Wood
john schwarcz
User Banned
Posted: 1st May 2009 19:36
thanks how can i do this

shadow666
Leon Kennedy
16
Years of Service
User Offline
Joined: 7th Sep 2008
Location: Neither here nor there
Posted: 1st May 2009 19:58
Quote: "thanks how can i do this "


I am going to assume that you are asking how to write the exact script, because I am fairly sure that you know how to attach a script to an entity and/or character. With that said...

I don't know. I haven't tried to adapt a character script to allow a HUD to display when you get close enough to that character. Now, I do know that there is a script floating around out there somewhere (and I shouldn't have to tell you to use Search AGAIN) that allows you to have (rudimentary) conversations with characters/entities. That script would probably work for you.

But if you're asking me to write the script for you, you're going to be disappointed. I may take a crack at it sometime just to see if I can do it, but I don't really have time to work on your stuff for you.

And on a side note, you sure have been requesting a lot of stuff lately. Are you putting any effort into doing this stuff on your own?

Priest of the Church of Joe Wood
john schwarcz
User Banned
Posted: 1st May 2009 22:35
ya im sorry, i have been trying, but i just went through a computer switch, long story, so i havto reinstall everythhing, including winows , but ya i didnt mean write the script, i thought maybe there was some file i could put it in to do this sorry agian
this is a great script as it is

shadow666

Login to post a reply

Server time is: 2024-11-25 00:50:29
Your offset time is: 2024-11-25 00:50:29