Scripts / Code for Flying - Available Now?

Author
Message
pianodavy
10
Years of Service
User Offline
Joined: 5th Nov 2013
Location: United States
Posted: 23rd Aug 2014 03:11
I have been away from FPSCR for a good while. I just found out that there is - or maybe is on the verge of release - a jetpack for a flying hud/avator available for purchase soon in the store. So...
Is there now an effect or a script that developers can use for our own hud/avator creations? I promised to release a specific model to the community (totally cost free) in the event that flying in this software was enabled and I would like to keep my promise in style. Sorry for not hunting through pages of forum -

All you need is love....so let me have your burger.
Jerry Tremble
GameGuru TGC Backer
11
Years of Service
User Offline
Joined: 5th Nov 2012
Location: Sonoran Desert
Posted: 23rd Aug 2014 05:12 Edited at: 23rd Aug 2014 05:14
Yep!



function AddPlayerJetPack(e,fuel)

SendMessageI("addplayerjetpack",e,fuel);

end



It's in the Global.lua file. Both mouse buttons for thrust. A lot of stuff in there that's probably new to you! Also, as of yet, the actual jetpack object is only available to referrals, not for purchase from what I've seen. The script works good, though, with or without handles

MAME Cab PC: i7 4770@3.4Ghz (passmark 9945), 12GB RAM, Win 8.1/64, GeForce GTX645 (passmark 1898); Shiny new laptop: i7 4800MQ@2.7Ghz (passmark 8586), 16GB RAM, Win 8.1/64, GeForce GTX870M (passmark 3598); Old laptop: i5@2.3Ghz, 8GB RAM, Win 7/64, Intel 3000 graphics
PM
butyouman
17
Years of Service
User Offline
Joined: 7th May 2006
Location:
Posted: 23rd Aug 2014 21:23
This is interesting but how would one go about applying this script to an entity or the character so that they can use it to fly? Sorry ahead of time, don't know a lot about scripting.
MK83
GameGuru TGC Backer
17
Years of Service
User Offline
Joined: 10th Jun 2006
Location: Greeneville, TN USA
Posted: 24th Aug 2014 02:11
Quote: "This is interesting but how would one go about applying this script to an entity or the character so that they can use it to fly? Sorry ahead of time, don't know a lot about scripting"
I would like to know the answer as well.

AMD 9850 black, 6 gigs ram, GTX 260 Win 8.1

PM
Jerry Tremble
GameGuru TGC Backer
11
Years of Service
User Offline
Joined: 5th Nov 2012
Location: Sonoran Desert
Posted: 24th Aug 2014 08:09
It's actually been available since at least the last beta! Not much scripting knowledge is required, I just added " AddPlayerJetPack(e,fuel)" to the bag of potato chips with a fuel value of 1000 (I didn't know how long that would last, but thought it was a good start. Turned out it lasted quite some time!) I just pasted that under the health add line or whatever it was, and BAM! Pick up the chips and you have smoke coming out your relative body parts! right and left mouse buttons simultaneously control thrust!

MAME Cab PC: i7 4770@3.4Ghz (passmark 9945), 12GB RAM, Win 8.1/64, GeForce GTX645 (passmark 1898); Shiny new laptop: i7 4800MQ@2.7Ghz (passmark 8586), 16GB RAM, Win 8.1/64, GeForce GTX870M (passmark 3598); Old laptop: i5@2.3Ghz, 8GB RAM, Win 7/64, Intel 3000 graphics
PM
The Next
TGC Web Engineer
16
Years of Service
User Offline
Joined: 3rd Dec 2007
Location: United Kingdom
Posted: 24th Aug 2014 14:47
You can get the jetpack by inviting a friend to pledge on FPSCR here http://en.tgcstore.net/?md=invite-friends

Or you can wait until we release the purchasable version into the store.

Once you have the jetpack you can see all the scripts and also how the entity works so you can change to work as your own if you wish.

Windows 7 Pro, Intel i7 3.8 GHz (Passmark: 9021), 16GB DDR3, NVIDIA GTX 780 4GB Superclocked (Passmark: 8056)
PM
pianodavy
10
Years of Service
User Offline
Joined: 5th Nov 2013
Location: United States
Posted: 24th Aug 2014 17:04
Thank you all for the information. Now I just need to get these fishing rods out of the way and get to business!

All you need is love....so let me have your burger.
MK83
GameGuru TGC Backer
17
Years of Service
User Offline
Joined: 10th Jun 2006
Location: Greeneville, TN USA
Posted: 25th Aug 2014 02:03
Quote: "I just added " AddPlayerJetPack(e,fuel)" to the bag of potato chips with a fuel value of 1000 (I didn't know how long that would last, but thought it was a good start. Turned out it lasted quite some time!) I just pasted that under the health add line or whatever it was, and BAM! Pick up the chips and you have smoke coming out your relative body parts! right and left mouse buttons simultaneously control thrust!
"


can't seem to get anything going, I must be doing something wrong.

AMD 9850 black, 6 gigs ram, GTX 260 Win 8.1

PM
butyouman
17
Years of Service
User Offline
Joined: 7th May 2006
Location:
Posted: 25th Aug 2014 03:02
I am right there with you MK83, I tried creating a separate .lua script naming it jetpack and including the above code into the script file. However when I apply it to an item such as the bag of chips ( replacing the health.lua with my jetpack.lua) my test game will not load.
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 25th Aug 2014 09:56 Edited at: 25th Aug 2014 09:57
Here you go. Basic, but works. not as good as the actual Jetpack, but you can fly with it.

Edit - the file did not upload correctly first time due to me forgetting to click upload



SPECS: Q6600 CPU. Nvidia 660GTX. 8 Gig Memory. Win 7.
MK83
GameGuru TGC Backer
17
Years of Service
User Offline
Joined: 10th Jun 2006
Location: Greeneville, TN USA
Posted: 25th Aug 2014 17:22
@DVader, I will try it out.

AMD 9850 black, 6 gigs ram, GTX 260 Win 8.1

PM
butyouman
17
Years of Service
User Offline
Joined: 7th May 2006
Location:
Posted: 25th Aug 2014 23:55
DVader the script works great, thank you very much for your help.
MK83
GameGuru TGC Backer
17
Years of Service
User Offline
Joined: 10th Jun 2006
Location: Greeneville, TN USA
Posted: 26th Aug 2014 00:49
yes, thank you, it works just fine.

AMD 9850 black, 6 gigs ram, GTX 260 Win 8.1

PM
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 26th Aug 2014 15:18
No problem, happy to help.



SPECS: Q6600 CPU. Nvidia 660GTX. 8 Gig Memory. Win 7.
lordjulian
10
Years of Service
User Offline
Joined: 10th Jan 2014
Location:
Posted: 27th Aug 2014 18:21
I would like a script to get vehicles such as helicopters flying.

Julian
PM
pianodavy
10
Years of Service
User Offline
Joined: 5th Nov 2013
Location: United States
Posted: 30th Aug 2014 21:38
Well.... I'm feeling like a moron here. What am I doing wrong? I am supposed to call for the function in the FPE, right? Can anybody show me exactly what the convention is suppose to look like in the FPE and where exactly the changes are supposed to be made for the function to be properly invoked? I see the function in the global.lua, but I have tried many different variations in the FPE and yet I can't get the object to even take on a typical "collectable" state, let alone start the flying process! I tried watching the tutorials but they seem to cover the specific scripts such as "key" and not this multi function all encompassing global script. Sorry to be such a weenie brain!

All you need is love....so let me have your burger.
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 30th Aug 2014 23:55
Quote: "Well.... I'm feeling like a moron here. What am I doing wrong? I am supposed to call for the function in the FPE, right? Can anybody show me exactly what the convention is suppose to look like in the FPE and where exactly the changes are supposed to be made for the function to be properly invoked? I see the function in the global.lua, but I have tried many different variations in the FPE and yet I can't get the object to even take on a typical "collectable" state, let alone start the flying process! I tried watching the tutorials but they seem to cover the specific scripts such as "key" and not this multi function all encompassing global script. Sorry to be such a weenie brain!"


nope, take the script above http://fpscrforum.thegamecreators.com/?m=forum_view&t=209617&b=2&msg=2496978#m2496978
and place it in the script folder
now open reloaded and place any entity in the editor
right click that entity and change the script field so that it links to the file you just downloaded (fly.lua in this case)
now when you run the game and walk near that entity you will pick up the jetpack and be able to fly

life's one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
pianodavy
10
Years of Service
User Offline
Joined: 5th Nov 2013
Location: United States
Posted: 31st Aug 2014 00:40
I put that script in the script folder way before I raised my question. When you state "change the script field so that it links to the file" - this is where I have apparently not been able to succeed. Can you give me an example of this "script field"? Are you describing the named "AI" (yes, I realize this means artificial intelligence")? I would so much appreciate a visual example of both this "script field" and also the method and convention which is applied so that the "link" can occur. Sorry I'm being dense about this.

All you need is love....so let me have your burger.
tomjscott
User Banned
Posted: 31st Aug 2014 02:36 Edited at: 31st Aug 2014 02:36
Here is the so-called script field circled in red. It's actually the "Main" field under AI System.





System Specs: OS - Windows 7 Home Premium 64-bit SP1, CPU - AMD Phenom II X4 945, 3.0Ghz, RAM - 8Gb DDR3, GFX Card - 2048MB NVIDIA GeForce GT 640, FPSC-R Version - Beta 1.0071

Attachments

Login to view attachments
pianodavy
10
Years of Service
User Offline
Joined: 5th Nov 2013
Location: United States
Posted: 31st Aug 2014 12:11
Fantastic! Got it working and thank you. The only problem was I have no idea how this happened - the screen froze and the audio got stuck in a loop and I couldn't even invoke my task manager to break the cycle - yup, that's right, I actually had to shut down my computer to restore access to my desktop. I am still very grateful for this break through, although this sort of flight is miles away from effective application. Nevertheless, we're getting there, eh?

All you need is love....so let me have your burger.

Login to post a reply

Server time is: 2024-05-03 08:57:51
Your offset time is: 2024-05-03 08:57:51