Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Game Items

Discussion in 'Editor & General Support' started by CoreCoder, Aug 11, 2015.

  1. CoreCoder

    CoreCoder

    Joined:
    Jun 11, 2015
    Posts:
    41
    Hello all.

    I am well on the way with my game but have some minor questions.

    SCENARIO. My character has a gun that shoots prefab bullets with assigned stats such as Damage=10, Velocity = 2500 etc, you get the idea. Now, I have added this as a script and and added this to the prefab.
    QUESTION. If I would like my Char to shoot many different stat bullets like a missile prefab with different stats such as Damage=80, Velocity=1200, SplashDmg=10 etc. Eventualy some projectiles will have A LOT of stats. How would I go about doing this. Do I have to make 1 single script for each prefab item or is there a good simple SQL database or any other system to store this. Inventory systems I have seen a lot of tutorials on.

    Just want to find the best way to add this. Dont want to get to far along the way in my game to find out I should have done it that way instead. Even if the game is not going to steam as my first game but I would like it done right to learn.

    Thank you in advance.
     
  2. jackjustjack

    jackjustjack

    Joined:
    Aug 8, 2015
    Posts:
    3
    One single script for prefab is enough :)