@x_BL0WBACK
Ok. I had a chance to muck around with some scripts last night.
Here is a prototype for how you could do Load Outs. Essentially after spawning you have 8 seconds to choose a load out. You cycle through the possible load outs by crouching.
A video that shows the script in action and then the key parts…
https://www.youtube.com/watch?v=OPREnP6yi5M
I don’t know why you drop the assault rifle on the first spawn. Maybe that is just a Forge test mode thing. You probably need to set the player’s first loadout On Game Start - or at least set the weapons not to drop there.
Anyway… the script is in the second part of the video.
Slide 1
Declares variables.
“pointer” is which loadout the player currently has selected. I’ve only set up four load outs, so it needs to be a value of 0 to 3.
“choosing” is a timer value for choosing your loadout. If this value is greater than zero then crouching will change your load out.
“hide” is a trait setting that stops you dropping your weapon. Otherwise you would drop each weapon on changing loadouts.
“drop” is a trait setting that sets weapon dropping back to normal.
Slide 2
On player spawned your “choosing” variable is changed to 80. This gives you about 8 seconds to choose a load out (it counts down every 0.1 seconds).
And then it triggers the custom event that equips your current load out (in slide 5).
Slide 3
Is the countdown event.
Every 0.1 seconds it grabs a list of all the players and then cycles through them.
In column 3 it grabs the player’s “choosing” variable and only continues if this is greater than zero.
Column 4 decreases choosing by 1 and saves the new value.
Column 5 and 6 check to see if “choosing” is now zero (ie. finished) - and set the player’s weapon dropping behaviour back to normal.
Slide 4
Waits for the player to crouch.
Column 2 checks if the player is standing back up (is crouching is false).
Column 3 checks the player is in the state of choosing a load out (the variable "choosing is greater than zero).
Column 4 takes the player’s “pointer”, adds 1, divides by 4, and keeps the remainder. This means that is cycles on each crouch; 0, 1, 2, 3, 0, 1, …
And finally we trigger the custom event.
Slide 5
The custom event that equips your load out. It’s called from On Spawn (slide 1) and from On Crouch (slide 4).
First it applies the trait that prevents weapon dropping.
Then Columns 3, 4, and 5 are essentially a set up to check if “pointer” is equal to 0, 1, 2, or 3.
Column 5 sets the primary weapon according to the value of “pointer”.
You could continue those lines to set up each player with a secondary weapon, grenades, equipment, and any other trait you needed (eg. speed, jumping, shields, etc).