• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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 21
Joined
Mar 29, 2020
Messages
1,237
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 64
Joined
Aug 10, 2018
Messages
6,546
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