• 🏆 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!

How to create quests

Status
Not open for further replies.
Level 10
Joined
Jun 7, 2008
Messages
420
Hi, I'm wondering how to create quests?
Because I can't create a complete quest trigger, all that it allows me to do is mark 'last created as complete' but that won't help when I have over a dozen quests in my map. Only other option is 'harshtable' goodness knows what that is.

Also, how to create a 'when ITEM enters region' event?
All I know how to do is

EVENT
Unit enter regeon

Condition
OR
-item class of (item being carried by triggering unit in slot 1) = X
-item class of (item being carried by triggering unit in slot 2) = X
-item class of (item being carried by triggering unit in slot 3) = X
-item class of (item being carried by triggering unit in slot 4) = X
-item class of (item being carried by triggering unit in slot 5) = X
-item class of (item being carried by triggering unit in slot 6) = X

ACTION
Complete last created quest

Is it possible to have an 'item class of item being carried by triggering unit in ANY SLOT = X
Or better yet, item enter region = x as an event

Also, please explain how messed up this trigger will be when I add 10 or more quests, at the moment its the only one so 'last created' will do.

Thanks
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
Create a quest variable array, and save the quests into it.

Save first quest to
  • Quests_Array[0] = Last created quest
second to

  • Quests_Array[1] = Last created quest
And so on. Then you can complete Quests_Array[0], Quests_Array[1]...

IronForge said:
Is it possible to have an 'item class of item being carried by triggering unit in ANY SLOT = X

Boolean - Hero has item of type
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
Ok, let's say you have four quests.

1) Kill neighbour's dog
2) Steal candy from children at the marketplace
3) Drink ten (12) beer.
4) Change your underwear

No matter the order in which the player discovers (or you create) the quests, always set

  • Quests_Array[0] = Last created quest
when you create the first quest,
  • Quests_Array[1] = Last created quest
when you create the second quest and so on.

When you want to complete the quests, just make
  • Quest - Mark Quest_Array[x] as Completed
where x is the index of the quest you want to complete.
 
Status
Not open for further replies.
Top