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).