Notifications
bg
b
blue_baron
Versailles, France
0
Likes
0
Followers
0
Connections
All
Articles1
Games1
Showcases0
Column2
Jobs0
This tutorial need an improve version https://learn.unity.com/tutorial/fps-mod-dual-weapon-wielding

This dual-weapon wielding have so many bug but I found a way to solve them.

Firstly, you need to choose which side you want to use for your single weapon. Open player from the Prefabs and complete the down "Player Weapon Manager" component like you saw from the tutorial with the side you want to side. Complete the up "Player Weapon Manager" component with the another side. You need to test your weapon with a blaster in a first hand and a shotgun in an another hand to check if it use the ammos of the side you want.

For the dual weapon, you need to create two similar weapon, add them in their names right and left in the appropriate side. Change their aim offset y=0 and x= to the x of the DefaultWeaponPosition. Double click to the projectile you use and set the "Trajectory Correction" to -5.

For the single weapon, you need a fake gun which you set the max ammo to 0, you disable the "Weapon Fuel Cell Handle" and "Overheat Behavior" component. Set everything in the scale to 0.01. You will have a gun and an invisible gun that will feel like to have a single gun.

Watch out, you can't have two same weapons in the inventory. If you want to do have it, you need to duplicate the weapon with an another name even if you use a fake gun.

Sorry if I can't explain clearly but I willl answer some question if you are stuck.

learn.unity.com
FPS Mod: Dual-weapon wielding (NEW) - Unity Learn
b
6 days ago
using System.Collections; using System.Collections.Generic; using UnityEngine; [RequireComponent(typeof(Pickup))] public class PickUpSingleWeapon : MonoBehaviour { public WeaponController weaponPrefab1; public WeaponController weaponPrefab2; Pickup m_Pickup; void Start() { m_Pickup = GetComponent<Pickup>(); DebugUtility.HandleErrorIfNullGetComponent<Pickup, WeaponPickup>(m_Pickup, this, gameObject); m_Pickup.onPick += OnPicked; foreach (Transform t in GetComponentsInChildren<Transform>()) { if (t != transform) t.gameObject.layer = 0; } } void Update() {
} void OnPicked(PlayerCharacterController byPlayer) { PlayerWeaponsManager[] playerWeaponsManager; playerWeaponsManager = byPlayer.GetComponents<PlayerWeaponsManager>(); for (int i = 0; i < playerWeaponsManager.Length; i++) {
if (playerWeaponsManager[i]) { if (i == 0) { if (playerWeaponsManager[i].AddWeapon(weaponPrefab1)) { if (playerWeaponsManager[i].GetActiveWeapon() == null) { playerWeaponsManager[i].SwitchWeapon(true); } m_Pickup.PlayPickupFeedback(); Destroy(gameObject); } } else { if (playerWeaponsManager[i].AddWeapon(weaponPrefab2)) { if (playerWeaponsManager[i].GetActiveWeapon() == null) { playerWeaponsManager[i].SwitchWeapon(true); } m_Pickup.PlayPickupFeedback(); Destroy(gameObject); } }
} }
} }
b
6 days ago
For the Pickup, remove the "Weapon Pickup" component, create a script which you will call it "PickUpSingleWeapon" copy the code which I give you to the next comment and use the "Pick Up Single Weapon" component.
They already designated the winners in this challenge :
https://connect.unity.com/challenges/fps-beginners-mods-challenge

That's something unexpected, I find the games of the honorable mention better than the games of the unity swag winner.

connect.unity.com
FPS Beginners Mods Challenge - Unity Connect
Mark McCorkle
Unity Padawan
2 months ago
Thanks for the heads up. All of the games had fun things in them. And I really appreciated the pressure of making a deadline. Now I'm training for the global game jam coming up end of January!
b
blue_baron
uploaded a submission to FPS Beginners Mods Challenge
Dec 12, 2019
Prototype FPS survival
Prototype FPS survival
Here some idea to make a FPS game
View Challenge
https://connect.unity.com/p/prototype-fps-survival

I finished to create a FPS game.
I could add more feature or improve the game if I had more time.
Anyway I share some idea :
- unique gun
- boss battle
- ennemis that work differently

connect.unity.com
Prototype FPS survival - Unity Connect
b
blue_baron
published the webgl
Dec 12, 2019
Prototype FPS survival
2 months ago
nice shotgun
About Me
No description
See more
Skills
No skills added yet
Certifications (0)
Import
See all
blue_baron's liked projects (3)
Following (0)
Not following anyone yet
Followers (0)
No followers
Following Companies (0)
Not following anyone yet