Scripts / Remove the Prompt "E" and it's function!

Author
Message
ShN33Ky
Game Guru Backer
11
Years of Service
User Offline
Joined: 24th Mar 2013
Location: San Clemente ca.
Posted: 28th Jul 2015 23:43 Edited at: 28th Jul 2015 23:46
Trying to remove the Prompt "E" and the functions that follow in a hud script and also trying to get the jetpack to auto collect like you would with the health so player automatically collects the item when close or on it!

Any help appreciated!!!


I'm looking at this in the Hud script :


Processor: Intel(R) i7-4700MQ CPU @ 2.40GHz 2.40 GHz Installed memory (RAM): 16.0 GB (15.8 GB usable) System type: 64-bit Operating System,x64-based processor

Start the day by righting your wrongs then end you day right so you don't have to do it again tomorrow ...

sHn33Ky
Bored of the Rings
GameGuru Master
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 29th Jul 2015 08:41 Edited at: 29th Jul 2015 11:43
For the "Prompt E" removal just simply remove that Prompt command from the code.
For automatic picking up of an item you need to check the player distance from the object (GetPlayerDistance(e)) i.e. the jetpack and if near the object set a pickup flag variable to 1 (Collected(e)) and then hide/remove the object (there is also AddPlayerJetPack(e,fuel)) otherwise if not near the object pickup flag variable will still be 0.
You will need to replace/remove any occurrences of 'if g_KeyPressE', as this is not what you want for automatic pick-up.
I would write the script but I am working at the moment (or supposed to be ).
Tip: Best way to write any script/program is to write down a short algorithm (or psuedo code) and then break that down to more detailed level of instructions and then convert those logical instructions into code.

also have a look at

SetActivated(e,v)

Sets the entity as active (v=1) or inactive. (v=0)

ActivateIfUsed(e)

Activates the enttiy named in the IfUsed properties field.

Collected(e)

Flag the entity as collected (e.g a key)

GetPlayerDistance(e))
Gets the player distance from the entity i.e. Jetpack

[update-actually there is already the jetpack.lua script, you could always copy and modify that script]
Professional Programmer: Languages- SAS, C++, SQL, PL-SQL, JavaScript, HTML, Darkbasic Pro, Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; LG TFT monitor (widescreen).
ShN33Ky
Game Guru Backer
11
Years of Service
User Offline
Joined: 24th Mar 2013
Location: San Clemente ca.
Posted: 29th Jul 2015 14:53
Thanks Bored of the Rings......

I have tried removing the prompt E command but it's in a hud script I found here in the forums call'd bbhelmet hud! It prompts the player to press E to activate a certain part of the hud but when E is press'd the hud animation freezes ! If I just remove the
"Prompt E" the function will still exist so if a player was to collect another item using the "Prompt E" the Hud animation will freez up!So thats what I'm trying to avoid...

I always try to do this stuff on my own and I will dive into the jetpack script today and give it a go! Please understand I "Tweak" scripts which is how I learn.Thanks to Pirate Myke I was able to get the jetpack script back to working with TPV and yes I renamed it and put it into the script bank!Where I get stuck is when I try to remove a part of a script then get an lua error when I try to run a test game!
Processor: Intel(R) i7-4700MQ CPU @ 2.40GHz 2.40 GHz Installed memory (RAM): 16.0 GB (15.8 GB usable) System type: 64-bit Operating System,x64-based processor

Start the day by righting your wrongs then end you day right so you don't have to do it again tomorrow ...

sHn33Ky
Bored of the Rings
GameGuru Master
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 29th Jul 2015 15:11
oh I see, I'll have a closer look at the scripts when I get time. I think I have the same bbhelmet hud script.
Professional Programmer: Languages- SAS, C++, SQL, PL-SQL, JavaScript, HTML, Darkbasic Pro, Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; LG TFT monitor (widescreen).
ShN33Ky
Game Guru Backer
11
Years of Service
User Offline
Joined: 24th Mar 2013
Location: San Clemente ca.
Posted: 29th Jul 2015 15:28
It's a mod of rolfy's nightvision script which would work better but rolfy's script contains all the shader commands! I just want it to go through images with a simple timing process! When I use my images in rolfy's script I cant even see my images just the shader effects! ... thanks for any help
Processor: Intel(R) i7-4700MQ CPU @ 2.40GHz 2.40 GHz Installed memory (RAM): 16.0 GB (15.8 GB usable) System type: 64-bit Operating System,x64-based processor

Start the day by righting your wrongs then end you day right so you don't have to do it again tomorrow ...

sHn33Ky
ShN33Ky
Game Guru Backer
11
Years of Service
User Offline
Joined: 24th Mar 2013
Location: San Clemente ca.
Posted: 16th Aug 2015 23:04 Edited at: 16th Aug 2015 23:07
1 down and one to go.....I got the prompt "E" and it's function out of the HUD script so now it just runs the images and lets you adjust the frame rate!

Here is the new script....I call it "multihud"


Processor: Intel(R) i7-4700MQ CPU @ 2.40GHz 2.40 GHz Installed memory (RAM): 16.0 GB (15.8 GB usable) System type: 64-bit Operating System,x64-based processor

Start the day by righting your wrongs then end you day right so you don't have to do it again tomorrow ...

sHn33Ky

Login to post a reply

Server time is: 2024-05-06 12:26:17
Your offset time is: 2024-05-06 12:26:17