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 / A few gun script questions.

Author
Message
Shaka
18
Years of Service
User Offline
Joined: 8th Sep 2006
Location: San Diego, CA
Posted: 25th Dec 2007 07:24 Edited at: 25th Dec 2007 07:26
In games like Call of Duty and Halo and a lot of other games, in-order to pick up a gun you have to press a button. In FPSC you instantly pick up a gun once you walk over it. I want to know if its possible to pick up a gun by pressing a button on your keyboard.

EX. An enemy drops a gun once he’s dead, you walk up to his dead body and it says "Press F to pick up gun"


Is there a way to make a limit yo the amount of guns you carry? Like a 2 gun limit.


Last one. If there is a way to add a limit to your amount of guns you carry, can you make it so you press a button to switch the gun you have to the gun you can pick up?


EX. You kill and enemy he drops his gun. you walk up to it and it says "Press T to switch guns"




I’m sorry if that’s a lot to ask.. I’m just curious that all. But if there is any way that any of these are possible, please let me know!

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 25th Dec 2007 09:14
No.

Sorry, but none of the above is possible with the default engine.

How the player picks up a gun is hard-coded into the engine, as is the fact that you can have more guns than you have numbers on the keyboard!


The one and only,
~PlystirE~

Urlforce:
Dude, I'd rather be declared a dbpro noob than an fpsc legend any day!
Shaka
18
Years of Service
User Offline
Joined: 8th Sep 2006
Location: San Diego, CA
Posted: 25th Dec 2007 09:38
Ooooh man really? That sucks. well thanks for your help!

Shaka
18
Years of Service
User Offline
Joined: 8th Sep 2006
Location: San Diego, CA
Posted: 28th Dec 2007 01:42
So does any one else have and idea if this is possible? Id love every ones idea.

Cyborg ART
17
Years of Service
User Offline
Joined: 14th Jan 2007
Location: Sweden - Sthlm
Posted: 28th Dec 2007 11:28
When Plystire has spoken about scripting there is nothing else to do

But maybe we could add a press key to use line in the weapon mainfolder, but that would only work on weapons that were placed, not dropped.

xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 28th Dec 2007 17:47
This is taken from weapon.fpi, which is the default weapon pick-up script.

:state=10,plrdistwithin=40:state=1,playertake,coloff,rundecal=-1,plrsound=audiobank\items\pickupweapon.

To make the player need to press a key to pick up the weapon, just change the first part of the line to something like...

:state=10,plrdistwithin=40,scancodekeypressed=33:state=1,playertake....

Now the player must press the correct key to pick up the weapon. You will also want to create and declare the proper HUD in the beginning of the script.

As for changing the number of guns you can have, I agree there is no way (yet).

Best.

Shaka
18
Years of Service
User Offline
Joined: 8th Sep 2006
Location: San Diego, CA
Posted: 29th Dec 2007 03:09
YES!!! Thank you so much! I knew there was somethin out there! well i have one question, did you mean on the part of the script thats in bold "33", do you want me to switch it to like f or something?

xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 29th Dec 2007 15:16
I've attached a pic of the scancodes. Each key has a numeric value and you must use this numeric value and not the letter it corresponds to. In this case, 33 = F.

Best.

Attachments

Login to view attachments
Shaka
18
Years of Service
User Offline
Joined: 8th Sep 2006
Location: San Diego, CA
Posted: 29th Dec 2007 19:38
Thank you so much xplosys! i really apreciate it!

Login to post a reply

Server time is: 2024-11-24 01:48:42
Your offset time is: 2024-11-24 01:48:42