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 / PLY HELP!!!! - Command help

Author
Message
A r e n a s
16
Years of Service
User Offline
Joined: 9th Jun 2008
Location:
Posted: 28th Apr 2009 20:32
Hey does anyone know a command or group of commands in plys mod or in normal FPSC that will tell you which slot is being used by the player. (Weapon slot) i need it for my limited weapons so that you switch the weapon that is being held with the weapon on the floor... I need this script guys! Please help!
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 29th Apr 2009 12:53
Well... here's one way you could do it:
- Run a check on every weapon that you have in the game
- If the player is holding any of those weapons, swap that weapon with the one on the floor.


An example would look like: (Weapon on the floor is modern/law)


Of course, the above script wouldn't be what you'd use. You would need to add more conditions and complete the necessary states that the script would consist of.

The method you're looking for, though, wouldn't work all that well with dual-wielding. The problem with "swapping" the floor weapon with the current weapon when dual-wielding is..... which weapon do you swap?


The one and only,


A r e n a s
16
Years of Service
User Offline
Joined: 9th Jun 2008
Location:
Posted: 29th Apr 2009 19:08
Im not having deul wielding. And i mean that the weapon that you pickup needs to switch with the weapon that you are holding at the current time. So im limiting it to two weapons and you need to start with a pistol. If you have no second weapon it sets the first weapon bought as the second. After that it needs to switch the bought with the weapon that is currently being held. The problem is that i cant find a command that switches the weapon with the current one...
A r e n a s
16
Years of Service
User Offline
Joined: 9th Jun 2008
Location:
Posted: 29th Apr 2009 23:51
Ah! I realise what you mean! That should work... ignore the other post
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 30th Apr 2009 07:11
Glad I could help


The one and only,


A r e n a s
16
Years of Service
User Offline
Joined: 9th Jun 2008
Location:
Posted: 30th Apr 2009 09:15 Edited at: 30th Apr 2009 09:25
This will be a very long way around it but atleast it will work.. The problem is that if i distribute these scripts then everyone will need to change them. Unless is somehow write one for every model pack and purchaseable. I will need, otherwise, to write it out step by step:

Wep 2 ---> Wep 1
Wep 3 ---> Wep 1
Wep 4 ---> Wep 1
Wep 5 ---> Wep 1

Wep 1 ---> Wep 2
Wep 3 ---> Wep 2
Wep 4 ---> Wep 2
Wep 5 ---> Wep 2

Wep 1 ---> Wep 3
Wep 2 ---> Wep 3
Wep 4 ---> Wep 3
Wep 5 ---> Wep 3

Wep 1 ---> Wep 4
Wep 2 ---> Wep 4
Wep 3 ---> Wep 4
Wep 5 ---> Wep 4

Wep 1 ---> Wep 5
Wep 2 ---> Wep 5
Wep 3 ---> Wep 5
Wep 4 ---> Wep 5

There would be alot of cut aand copying...

I imagine that a script like this would work:



Then send the relevant condition to the relevant weapon switching block. I would need to make every weapon its own block and every weapon its own value... It would be very time consuming but as i said before, it should work...
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 1st May 2009 01:24
Remember to use commas for seperating conditions from other conditions and actions from other actions. You can't use colons for everything as it will confuse the parser.


The one and only,


A r e n a s
16
Years of Service
User Offline
Joined: 9th Jun 2008
Location:
Posted: 1st May 2009 14:19
I do have a problem with the theory that you came up with. I'll post it when i get home...

Login to post a reply

Server time is: 2024-11-25 00:21:00
Your offset time is: 2024-11-25 00:21:00