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 / swap weapon script?

Author
Message
Homegamesindie
7
Years of Service
User Offline
Joined: 28th Jul 2017
Location:
Posted: 2nd Jun 2020 23:50
hello i need a script or some for a max number of weapons and swap weapons like call of duty 2 for my game
i search some in the ofrum but i cant find nothing that works
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 3rd Jun 2020 00:35
Homegames The Syntax list is your friend, very easy. Look for a command called "setmaxweapons=x" to set maximum weapons a player can have.
And I really dont know what "swap weapons like CoD2" is? It's probably done with a custom animation. Not something script wise
** WHERE'S MY DARN YELLOW BUTTON ? **
Homegamesindie
7
Years of Service
User Offline
Joined: 28th Jul 2017
Location:
Posted: 3rd Jun 2020 20:59
ncmako im talking of swap weapons for example if the max number of weapons that the player can carry is 3 (a pistol, main weapon, grenade) and the player found a submachine gun and he wants
to leave the pistol to take the submachine gun
Watch this gameplay in the minute 5:56 when the player go to a table with weapons https://www.youtube.com/watch?v=AHRThPGp0Rs&t=338s
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 4th Jun 2020 11:54 Edited at: 4th Jun 2020 12:01
Homegames I have something that might work. Your going to have to adjust the script some so it
works in your situation. After setting up the "maxweapons" script use the script attached for the weapons
Main ai script. Each weapon will have to have its own weapon slot. But it does work. With this script player
can pickup a weapon then drop it when a better weapon comes along.

Note: the weapon/script must be "always active" for this to work.
** WHERE'S MY DARN YELLOW BUTTON ? **

Attachments

Login to view attachments
Homegamesindie
7
Years of Service
User Offline
Joined: 28th Jul 2017
Location:
Posted: 4th Jun 2020 23:25
thanks, i only add in the main and tuirn always active? i dont need press any key for drop?
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 5th Jun 2020 01:12
Homegames
Quote: " i dont need press any key for drop?"

Of course you need to press a key, how else would it know when to drop a weapon?
Open the script, read thru it. Its easy to see which key to press to both pickup and drop weapon
Let me know if you figure it out
** WHERE'S MY DARN YELLOW BUTTON ? **
Homegamesindie
7
Years of Service
User Offline
Joined: 28th Jul 2017
Location:
Posted: 6th Jun 2020 01:07
ncmako thenks, i find the key, but i try to add this script to all weapons, for when a enemy is dead drop a weapon and replace too but i cant , i add this editing the weapon fpe and the command
always active=1 but dont works
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 6th Jun 2020 12:02 Edited at: 6th Jun 2020 12:05
Homegame
Quote: "and the player found a submachine gun and he wants to leave the pistol to take the submachine gun "

Quote: "Watch this gameplay in the minute 5:56 when the player go to a table with weapons "

You said nothing about an enemy dropping their weapon before. This script is only for the Player
to pickup or drop their weapon. Just like in that CoD2 video you linked me. When an npc drops their weapon
and player picks it up this script is not attached. I'm not sure how you have this situation setup?
** WHERE'S MY eXplosys ? **
Technedo
4
Years of Service
User Offline
Joined: 8th Jun 2020
Location:
Posted: 8th Jun 2020 03:52
Thanks for sharing. I am looking for this topic and finally find the script to pick and drop weapon. Just needs the situation setup. Thanks
Latest Gadget
Tech News
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 8th Jun 2020 11:36 Edited at: 8th Jun 2020 11:37
@ Technedo The problem lies in what slot the current weapon is in and which one the player wants to drop.
In the first script weapon in slot #2 is dropped. It's something to build on for carrying more weapons.
This script is for carrying only one (1) weapon at a time. Add more slots and test run to debug.
Make each weapon you place "Always Active=yes" With three or more weapons it does get buggy but is doable.
** WHERE'S MY eXplosys ? **

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-11-07 04:36:10
Your offset time is: 2024-11-07 04:36:10