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 / Backpack item selection

Author
Message
Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 15th Sep 2017 08:03 Edited at: 15th Sep 2017 20:30
Here is a backpack script for the Doctor's Backpack. It includes image huds, raw text and use of scancodekeypressed commands and more so that player can choose one of four items in his backpack. Also player can choose grabbing Nomad's flashlight. If you would like me to break it down for you. I would be glad to do it. It will take some time and if nobody is interested I'll just leave it as it stands. Actually, it would be useful for those who want to learn how to script FPI to try and follow it themselves first.

THEORY - you know everything but nothing works. PRACTICE - when everything works but don't know why.
For me, theory and practice are combined: nothing works and I don't know why.
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 15th Sep 2017 11:13
FlatLander Wow..... you put a lot of effort into this, thank you for sharing.
These scripts are always good to keep on file, they sometimes come in handy for other reasons...?
Will play with this now and see what I can do. If I have any questions I'll be sure to ask.
A big thank you
My games never have bugs. They just develop random features..
Lots and lots of random features...
Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 15th Sep 2017 20:33 Edited at: 15th Sep 2017 22:00
ncmako, I send you a big "you're welcome"

I forgot to change the description to read, "Retrieve backpack inventory by pressing B" It is fixed in original post.



This only allows for four items that are usually of immediate need for the doctor. I'm currently working on a more extensive inventory system. The biggest problem I think is the ability to setup and use a pointer like I was able to do in RPGmod; especially the ability to use one within the test game.

[Addendum]:

Attached is a zip file that contains some huds I use to make it easier to run the script. Just drop it into the gamecore\huds folder.
THEORY - you know everything but nothing works. PRACTICE - when everything works but don't know why.
For me, theory and practice are combined: nothing works and I don't know why.

Attachments

Login to view attachments
Mriganka
10
Years of Service
User Offline
Joined: 16th Jun 2014
Location: Virtuality
Posted: 18th Sep 2017 08:49
@Flatlander Awesome script. But do explain each individual parts of the code as I cannot get the bagpack to function properly.
Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 18th Sep 2017 09:44
OK, I'll attend to that in the next couple of days, God willing.
THEORY - you know everything but nothing works. PRACTICE - when everything works but don't know why.
For me, theory and practice are combined: nothing works and I don't know why.
Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 19th Sep 2017 01:59 Edited at: 19th Sep 2017 02:54


It sounds like I'm drunk; but I'm just hopped up on anti-depressants and anti-anxiety meds. I'm feeling much better now.



OK, let's get going. Here is an outline of what you need to do:

1. Huds
2. Items
3. Map
4. Script

Huds

Make sure that the huds folder that I uploaded in an earlier post is in the gamecore\huds directory

Items

This is another free gift I will give you. You will see an attached zipped assets file. Place these folders into the gamecore\guns directory. The sonic screwdrivers were made for me and given to me to do with what I like. This was a long time ago and I think if others would have use for them, they should be shared.

Map

That is the FPSC map level. Open up your map or create a new one for testing purposes. There is one main thing you need to do and that's to actually place each of the four items in the map. They should of course be dynamic. Set all of them to "always active" and they should not be spawned. See the attached image. The names should be unique and will be used in the getcinematichands command. Of course I use this because they are guns or simulated type of weapon such as a hand holding a clue card or envelope or of some sort. So the second part of the command is the folder name within the guns directory. Example: getcinematichands=SonicScrewdriverBlue DrWho_Sonic_DB If you would want to use Nomad's flashlight you should already have it if you had gotten BIM.

Script

The backpack/toolkit script needs to be available within the map. I just happen to use one of my pickup letters that I used in a children's game. Guess what letter is. See attached image The entity should be dynamic, always active and the script should be in the main AI Scripts section. Depending where is is in the map you can either spawn it or not.

Tomorrow I will give more information about the script
THEORY - you know everything but nothing works. PRACTICE - when everything works but don't know why.
For me, theory and practice are combined: nothing works and I don't know why.

Attachments

Login to view attachments
xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 20th Sep 2017 03:16
This is great. Thanks for sharing.
Characters. You build them a world and what do they do? They moonwalk, get stuck in the walls and fall through the floors!

Login to post a reply

Server time is: 2024-11-23 08:18:18
Your offset time is: 2024-11-23 08:18:18