• 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.

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?
 
Level 25
Joined
Mar 29, 2020
Messages
1,466
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.
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
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.
Top