- Home /
How do i make a quest in c# for my game?
Hello there, i am in no way an expert in c# and I've been looking around for a tutorial on how to create a quest system. I know there are things you can purchase which will do this for you but id rather learn myself. I have looked myself but most of what i looked at online did not help me.
an overview of what i want:
you right click npc quest box with text appears you click accept or decline you do what the npc wants, ie grab an onion from the ground you return to the npc with the item the npc thanks you and offers you a reward you receive the reward and your on your merry way
Many Thanks in Advance.
You're likely going to have to write that yourself, as it's the "meat" of the game, not something that can be easily reused in multiple games, so there is unlikely to be something available. Alternatively, $$anonymous$$m up with a programmer.
I have the same problem to solve but your question is far too big to answer very precisely, however in my view:
Quests are data driven
A quest would be a subclass of ScriptableObject
you will need an editor and menus to create quest assets
your npc will have a List of your QuestData for quests the NPC can offer
Quests that involve killing mobs will mean you will need a list of mobs and some way (I.e an index or a guid) of tying the mob to a quest for kill x of mob type Y
collecting will similar need to know whether items you collect are quest items
As you can see it's quite complex and you'll need custom editors to make it scalable!
Hope the comments help tho...
Answer by Zorcian · Sep 03, 2011 at 03:01 PM
ok id say he is partially correct but it may not be that be that simple. yes you will need objects but moslty those objects will have var. attavhed to them and you use these to let the system know if they have met the requirements for that quest. your best bet is to try and learn C# from the varible basics in unitys scripting in unity or online. good luck email fusmc7@gmail.com for more help.
@Zorcian if by "he" you mean me - I would point out that what I have written is some considerable distance from being simple
~Thank you both, yes i did understand from the start i would need to have data lists and such. So i do agree with you Bovine, i will indeed take two steps back and learn more c#. so thank you to you both, and i will indeed email you :).
Your answer
Follow this Question
Related Questions
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
Distribute terrain in zones 3 Answers
Multiple Cars not working 1 Answer
C# How to have a gun select 1 Answer