How to create weapons and items

First Steps

1- Place Item Model in Scene and Unpack Prefab

2- Set layer to "Item" layer

3- If you want use Drop System and Pick Up System, add a Collider and RigidBody

4- Add any of the components below, configure it and create the prefab by dragging it to a folder in the Project window.

Basic Holdable Item Setup

In JU TPS there are some types of ready-made holdable items, they are: General Holdable Item, Weapon, Granade and Melee Weapon

All holdable items will have the essential parameters below, this means you can repeat the first steps for all holdable items

General Holdable Item Setup

It has no differences from the default holdable items settings other than events that you can use to call functions from code or simple actions like turning a light on and off:

Weapon Item Setup

The Weapon Component has some unique parameters that you will need to configure:

Melee Weapon Setup

Melee weapons are simple:

Damager

Damager is a script that basically works to damage any GameObject with JU Health Component.

Needs a collider and a rigidbody to detect collisions.

Throwable Item / Granade Setup

The Grenade Component is basically the Throwable Item Component with an explosion option:

Explosion Effect

The explosion effect can be equipped with the Explosion Component which can physically simulate an explosion and deal damage to characters. It's also interesting to put the Shake One Time component in the explosion, it will do the Camera Shake effect (Make sure you have a Shaker assigned to your Camera)

Last updated