MMFPSE (Team Loadout)

Post Reply
sircrayons77
Posts: 3
Joined: Thu Jun 18, 2020 7:29 am

MMFPSE (Team Loadout)

Post by sircrayons77 » Thu Jun 18, 2020 7:51 am

Hey, really been enjoying how awesome this asset is and seeing how it works because I have been struggling with Photon and network based things.
As for the question, how could I force a certain Loadout with pre defined Weapons for a Team? For example, if your on Team 1 in the "Team Deathmatch" gamemode instead of choosing a loadout I want to have already set their loadout when they spawn. Really hope someone can help me out, thanks :)

User avatar
themars2011
Site Admin
Posts: 67
Joined: Mon Dec 02, 2019 8:59 pm
Location: Germany
Contact:
themars2011’s avatar
Loading…

Re: MMFPSE (Team Loadout)

Post by themars2011 » Thu Jun 18, 2020 9:50 pm

This is actually quite easy, in the game mode there is a bool function called "UsesCustomSpawn", if you are team one, return true, if not, return false. Then you can set a custom loadout in CustomSpawn (look at Kit_GMB_GunGame on how this works).

Hope that helps!
Asset links posted by me may be affiliate links using the Unity Affiliate Program and yield a small amount of share at no additional cost for the buyer should a purchase be made.

sircrayons77
Posts: 3
Joined: Thu Jun 18, 2020 7:29 am

Re: MMFPSE (Team Loadout)

Post by sircrayons77 » Sat Jun 20, 2020 6:49 am

Hey, thanks for the help but I am still unable to get it to work. I checked out the bool function "UsesCustomSpawn" and did what you instructed with no errors but it is not working as intended. Perhaps there is another way I should be going at it, I am considering looking at the script that allows weapons to be picked up and see what I can reference from there. I feel I am likely making a mistake as I am definitely a beginner with coding in general, could you show me what you would put in ""UsesCustomSpawn", maybe I am forgetting something, really appreciate your help :)

User avatar
themars2011
Site Admin
Posts: 67
Joined: Mon Dec 02, 2019 8:59 pm
Location: Germany
Contact:
themars2011’s avatar
Loading…

Re: MMFPSE (Team Loadout)

Post by themars2011 » Wed Jun 24, 2020 8:23 pm

Did you take a look at the gun game script ?
Asset links posted by me may be affiliate links using the Unity Affiliate Program and yield a small amount of share at no additional cost for the buyer should a purchase be made.

sircrayons77
Posts: 3
Joined: Thu Jun 18, 2020 7:29 am

Re: MMFPSE (Team Loadout)

Post by sircrayons77 » Tue Jun 30, 2020 4:53 am

Yea I got it working, thanks for the help buddy, took a different approach tho xD

User avatar
themars2011
Site Admin
Posts: 67
Joined: Mon Dec 02, 2019 8:59 pm
Location: Germany
Contact:
themars2011’s avatar
Loading…

Re: MMFPSE (Team Loadout)

Post by themars2011 » Thu Jul 02, 2020 10:57 pm

Lot's of ways to do what you need to do, the one I mentioned would leave everything else intact and working, other ways include modifying the loadout etc.

What did you do? It might help someone in the future, if you don't mind sharing your approach :)
Asset links posted by me may be affiliate links using the Unity Affiliate Program and yield a small amount of share at no additional cost for the buyer should a purchase be made.

Birra
Posts: 2
Joined: Tue Aug 18, 2020 10:00 am

Re: MMFPSE (Team Loadout)

Post by Birra » Tue Aug 18, 2020 11:10 am

i understand, but where is the loadout saved? I would like to make a button that directly sets a default loadout at the start of the match. I would put it before the player is created, in this way the player would be spawn with the already defined loadout.

User avatar
themars2011
Site Admin
Posts: 67
Joined: Mon Dec 02, 2019 8:59 pm
Location: Germany
Contact:
themars2011’s avatar
Loading…

Re: MMFPSE (Team Loadout)

Post by themars2011 » Sat Aug 29, 2020 11:46 am

Birra wrote:
Tue Aug 18, 2020 11:10 am
i understand, but where is the loadout saved? I would like to make a button that directly sets a default loadout at the start of the match. I would put it before the player is created, in this way the player would be spawn with the already defined loadout.
In the version that was active when you asked it was saved in the script Kit_LoadoutDefault.cs in an array of Loadout objects
Asset links posted by me may be affiliate links using the Unity Affiliate Program and yield a small amount of share at no additional cost for the buyer should a purchase be made.

Post Reply