• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Better way of using variables for quests?

Status
Not open for further replies.
Level 3
Joined
Nov 26, 2009
Messages
35
What is better way to do a variables for quests? Should it be unique for every quest or better to make massives?
Right now i wondering about possibles technical issues. For me it will be better to use massive's.
1622826230231.png

So every quest will have their index for massive variable. Most of quests are repeatable. Also all quests are global, every player get it.
Or should i use hashtables(only one) for that?
 
the problem with using the same variables for everything is that there is more of a chance you will overwrite it and cause bugs. Essentially, you could have them all using the same variables if you do it carefully, but it also depends on the nature of the quests, your map, and what you are storing in the variables. sounds a lot safer to just create separate variables for each quest.
 
I would do a combination of the two:

Massives:
QuestItemStart (item-type array that is used to start a quest)
QuestStartTrigger (trigger array that runs the Start trigger for a quest)
(optional)
QuestCounter (used for quests that require a simple counter like kills/collecting items)
QuestCounterComplete (used with QuestCounter to determine how many kills/items are required to complete the quest)


QuestCounter and QuestCounterComplete will only ever be useful if you have more than 1 Quest that can take advantage of them.

If a quest ever has anything unique to itself then there's nothing wrong with making variables exclusively for it. There's no reason you can't do both.
 
Status
Not open for further replies.
Back
Top