I need a C# code for RPG items

I need a code that I can attach to a sword (for FPS) or an axe and be able to change how much damage it does, how much it weighs, and how much it costs.

What have you tried so far?

1 Like

I guess he hasn’t tried anything at all.

I should attach my wish list. Maybe santa drops by… :roll_eyes:

4 Likes

Have you been through this: Learn ?
:slight_smile:

Well, I haven’t tried anything yet because I do not know C#. I have only just started with Unity. I am using UniRPG Free as my database.

For sure you want to start ‘smaller’: learning C#, and some Unity basics (interface/UI/C# as it pertains to unity).
With those building blocks, you’ll be able to learn, figure out, and do more and more as you learn & gain experience.

It will help you understand the ‘parts’ that go into building your game. :slight_smile:

2 Likes

As others have said what you’re asking for is pretty complicated, I came across this Brackey’s tutorial on weapon switching though which will get you at least switching your weapons and I’ve gotten the code running myself so I can confirm it works.

What you’re going to have to learn though to do what you want to do is complicated because you’ll need to learn the following.

. Databases, lots of databases

. Actually getting a store coded and up and running that runs off said databases

. Inventory screen that also runs off the databases

Then to make matters even more complicated you have to make sure you know how to get all the stats running right. If you’re still determined then I would actually look at two different projects, the FPS itself and then how to code an RPG and I would follow Brackey’s RPG tutorial so that you can get a handle on how to code all the RPG elements of a game without having to be frustrated with putting the two together in an FPS.

After you’ve done all this, then, then you might have a sufficient understanding of all the game mechanics involved in making an FPS/RPG hybrid like you’re planning. Unless you’re really planning on going ahead with this I would stick with a basic FPS for now and then keep learning because otherwise you’ll find yourself very frustrated at dealing with such a big project.

Programming Santa…If only that were real, some days I could use one.

2 Likes