Vars best way to make a quest?

I have a script that is my sample quest. It sends you to talk to the baker, which is just a series of windows, buttons and of course, vars. Are vars the way to go with a quest? Where if questcompleted = false; letting you see the quest and questcompleted = true; hiding it?

I was making just a simple objective in my game to give the player something to do, and as entertainment to me :smile:

Anyone else have a different way to do it they may want to share?

I am also in the process of thinking a way to make a quest log window but everytime I call a static var for the name my whole Unity crashes :frowning:

I like using an enumeration to handle quest statuses.

enum QuestStatus
{
  undiscovered,
  started,
  completed
}

This way you can put all the quests which have a Status value of started in the Quest Log.

Is there any advantage of doing it that way over doing it in vars? I picked doing vars because that was the easiest way to me to do it but may be more complex then I though it was when I began

Do whatever is easiest for you, that’s what it comes down to. If you can understand it without enumeration, go for it. I was just offering another method. In the end, it’s whatever system you understand. Then from taht you’ll figure more stuff out and progress. :slight_smile:

tyvm :slight_smile:
I am not a very experienced programmer but I have had unity for about 4 months now and decided that I would try to make alot of different simple items for a game (Like combat, quests inventory) then put them together for a small game that id at least enjoy :smile: Another ? static vars are used by the GetComponent class correct? I was trying to get one js to read another and that worked for having both scripts on the same object, my little test cube, but I want to expand that. When I mean expand I mean read one js that is not on the object 8)

I usually just have each quest be its own modular script with actors (transforms), settings (booleans), and other associated information. If it isn’t completed, the boolean is made true when complete. That’s only if the “repeatable” boolean is false, though.

o interesting :slight_smile:

tyvm guys