Hello! Let me introduce a tool for Unity 3D called FPS Kit | Version 2.0
This tool contain everything you need to create a First Person Shooter - Now With Multiplayer Support
- This package is no longer available on Asset Store
Here is a list of features included in this package (All of next features are working in Unity Free):
- Multiplayer powered by Photon Cloud
- Team selection - New
- Map selection - New
- Scoreboard with Kills/Deaths/Ping - New
- Game Modes: Deathmatch and TeamDeathmatch - New
- Weapon System that allow to create numerous types of weapons, such as Shot Gun, Machine Gun, SIngle Fire Rifles, Pistols, Grenade Launchers, Rocket Launcher, Grenades and Knives;
- Weapon Recoil System and Dynamic crosshair;
- Smooth weapon rotation and movement responce effects;
- Sniper scope feature (Call of Duty style);
- FPS Controller with ability to Run, Jump, Crouch, Prone and Climb Ladders;
- Weapon Pick Up system (With 2 types of pick - Add to player weapon list or Replace current weapon with picked), also with ammo pick up feature;
- Realistic Camera Bob and Weapon Sway effects;
- Step sound controller, Flash light controller and Smooth Slow Motion effect controller included
- GUI Example (Main Menu, Ammo Count, Weapon List and alot more)
- 9 Example Weapons and 4 Example Scenes included
Web Player previews:
Multiplayer v2.8 - New
Mini Game
Free Run
Documentations
Weapon Script
Weapon Pick Up
FPS Controller
Ladder System
Tutorials (WIP)
How to setup new weapon?
Setup impact holes for different surfaces
Setup Multiplayer Scenes - New
Setup 3rd Person Character for Multiplayer - New
Update Log
- Version 1.6 (24.01.2014) - New
NOTE: This version was entirely converted to C# so it’s no longer compatible with previous versions of Kit.
Folder “FPS Kit 2.0” was renamed to “FPS Kit 2.0 C#”
- Converted all scripts to C#
- Fixed chat bug
- Added fall damage
- Updated PhotonCloud plugin
After importing dont forget to:
- Setup your PhotonCloud ID and isert it into PhotonNetworking settings
- Add Multiplayer Scenes into build setting to able play
… For older version notes check “ReadMe!” file inside package
Simple Mods - list of simple scripts compatible with Kit
- Kill Player without damaging it (Example: Player fell down)
1)Open PlayerDamage.cs and add next functions at line 150
void DestroyOurPlayer(){
if(photonView.isMine){
photonView.RPC("RPCDestroyOurPlayer", PhotonTargets.All);
}
}
[RPC]
void RPCDestroyOurPlayer(){
//Spawn ragdoll
GameObject temp;
temp = Instantiate(ragdoll, transform.position, transform.rotation) as GameObject;
if(photonView.isMine){
temp.SendMessage("RespawnAfter");
StartCoroutine(DestroyPlayer(0.2f));
}else{
temp.SendMessage("clearCamera");
}
}
}
2)Then create new Javascript that will be attached to object with Box Collider marked as Trigger and paste next code
function OnTriggerEnter (other : Collider) {
other.gameObject.SendMessage("DestroyOurPlayer", SendMessageOptions.DontRequireReceiver);
}
- Make player leave room when Round Ends
1)Open RoomMultiplayerMenu.cs and scroll to line 232 where it says:
StartCoroutine(Restart());
2)Replace with:
LeaveRoom();
- Add points to our team when walking inside trigger area (Example: Capture the flag)
- Open RoomMultiplayerMenu.cs and add next function at the end of script right before last “}” line:673
void CaptureFlagAddPoints(){
//Add points to our team
int teamScore = new int();
if((string)PhotonNetwork.player.customProperties["TeamName"] == team_1.teamName){
teamScore = (int)PhotonNetwork.room.customProperties["Team1Score"];
teamScore ++;
Hashtable setTeam1Score = new Hashtable() {{"Team1Score", teamScore}};
PhotonNetwork.room.SetCustomProperties(setTeam1Score);
}
if((string)PhotonNetwork.player.customProperties["TeamName"] == team_2.teamName){
teamScore = (int)PhotonNetwork.room.customProperties["Team2Score"];
teamScore ++;
Hashtable setTeam2Score = new Hashtable() {{"Team2Score", teamScore}};
PhotonNetwork.room.SetCustomProperties(setTeam2Score);
}
}
- Create new Javascript which will be attached to Area (Box collider marked as trigger) and paste next code
function OnTriggerEnter (other : Collider) {
if(other.gameObject.tag == "Player"){
GameObject.FindWithTag("Network").SendMessage("CaptureFlagAddPoints", SendMessageOptions.DontRequireReceiver);
}
}
}
- NOTE:* Each time player will walk inside area one point will be added to it’s team