- Home /
Question by
SalDaDoor · May 26, 2021 at 09:04 PM ·
shopweapon systemequipcod
Weapon System Like CoD Zombies Buying Weapon And Loosing Equipped Weapon
I'm fairly new to coding and haven't been able to find anything about a system like this. If anyone knows any videos or links to buying a weapon and losing your equipped weapon I would greatly appreciate it. My coding skill is also very poor but this is the idea of what I want it to do.
Click button. If player has enough points, destroy current weapon and instantiate new weapon. Loose points needed.
using System;
using Collections;
using UnityEngine;
using UnityEngine.UI;
namespace HelloWorld
{
public void ButtonClick()
{
if()
{
points >= 500;
{
Instantiate Weapon3 = (other.position, other.rotation);
}
}
else()
{
{
Debug.Log("Not Enough Points");
}
{
Destroy.GameObject("Weapon1");
}
}
Comment