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 / Problem with HUD; HUD only displays under certain conditions...

Author
Message
Captain Coder
FPSC Reloaded TGC Backer
13
Years of Service
User Offline
Joined: 6th Jul 2011
Playing: Elite: Dangerous
Posted: 24th Jul 2013 07:05
Hello

I used to be a very active participant on the forums a few years ago and was a decent scripter (though I didn't post much of them )

However, I am semi-quickly re-learning the ropes of scripting. I wrote my first HUD script - and it works!




But I'm having a slight issue: the HUD only works when I stare directly at the object. You're probably thinking, "So what?" Well, here's the story: the object that is running the script is really a sheet of paper - in fact, it's the weapon pickup for the paper_2 in "The Scary Thinker" Puzzles model pack (can't remember the exact number; it's been too long ). The way the paper is situated, it's lying on top of a table. However, in order for the HUD to display, I have to jump onto the table. I don't want that. I want it to display when the player gets close.

Can someone tell me what I'm not doing right/point me in the right direction?

Thank you,
Captain Coder

As a believer in Jesus Christ, I am trying to use my passion for game creation for His glory.
Anubis
12
Years of Service
User Offline
Joined: 6th Nov 2012
Location: Netherlands
Posted: 24th Jul 2013 11:39
Try plrdistwithin=120 to increase te range and see if that works..

plrdistwithin=20 is very close to the object.

If the table takes up a whole segment and the letter is in the middle.. the distance is at least 50 to the edge of that segment.

In this case (20) i can imagine you need to get onto the table.

Offcourse you need to enlarge the plrdistfurther too.

Grts
Anubis

-+- There are only 10 types of people in the world. Those who understand binary, and those who don't -+-

[Chipset:X58 CPU:i7.950.64 GPU:HD5970 RAM:12GB DDR3 WIN:7.x64 PRO FPSC:1.20.10]
Captain Coder
FPSC Reloaded TGC Backer
13
Years of Service
User Offline
Joined: 6th Jul 2011
Playing: Elite: Dangerous
Posted: 26th Jul 2013 04:59
I did plrdistwithin=100 (same for plrdistfurther) and it does not show up at all now. Any proposal now?

Thanks,
Captain Coder

As a believer in Jesus Christ, I am trying to use my passion for game creation for His glory.
Anubis
12
Years of Service
User Offline
Joined: 6th Nov 2012
Location: Netherlands
Posted: 26th Jul 2013 14:43


I tried the script myself and it works for me.
When im in range (100) the hud displays, no matter which direction i look. When i get further away than 100 the message disappears.

You might need to make the entity Dynamic and Always Active.

Grts,
Anubis

-+- There are only 10 types of people in the world. Those who understand binary, and those who don't -+-

[Chipset:X58 CPU:i7.950.64 GPU:HD5970 RAM:12GB DDR3 WIN:7.x64 PRO FPSC:1.20.10]
The Master D
15
Years of Service
User Offline
Joined: 20th Feb 2009
Location:
Posted: 27th Jul 2013 02:20
A lot of people don't realize that you don't have to make the entity Static to keep it from moving. You just have to set the entity to Dynamic, make sure that the Is Immobile setting is set to Yes, as well as making sure that Always Active is also set to Yes, and this script should work no problem!
Hope that helps, mate!

AMD FX-6300 Vishera 3.5GHz, Radeon HD 7850 2GB, 8 GB RAM, Win 7 Pro 64 Bit
Captain Coder
FPSC Reloaded TGC Backer
13
Years of Service
User Offline
Joined: 6th Jul 2011
Playing: Elite: Dangerous
Posted: 7th Aug 2013 06:47
Thanks all, the script works now!

However, I have a new problem: the entity page model hovers about a foot above whatever surface it is supposed to be resting on. This is also true of ammo and weapon entities

As a believer in Jesus Christ, I am trying to use my passion for game creation for His glory.
The Master D
15
Years of Service
User Offline
Joined: 20th Feb 2009
Location:
Posted: 7th Aug 2013 20:50
All you have to do for that is hit Enter when you are in the Entity Placement mode, and it will snap to ground level of the nearest segment/entity that you are trying to place it on.

AMD FX-6300 Vishera 3.5GHz, Radeon HD 7850 2GB, 8 GB RAM, Win 7 Pro 64 Bit
Captain Coder
FPSC Reloaded TGC Backer
13
Years of Service
User Offline
Joined: 6th Jul 2011
Playing: Elite: Dangerous
Posted: 16th Aug 2013 01:17
That does not work; I did that in the first place. It still hovers Not all dynamic entities do this (I have some boxes and tables you have to push out of the way to get to things), so I don't know how to fix it or where to start with debugging. Does anyone have any suggestions?

And sorry it took so long to get back to this; I've been busy getting ready to go to college (whereupon my activity on the forum will most likely, again, be reduced to zero XD)

Thank you,
Captain Coder

As a believer in Jesus Christ, I am trying to use my passion for game creation for His glory.

Login to post a reply

Server time is: 2024-11-23 10:34:56
Your offset time is: 2024-11-23 10:34:56