• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Quests

Status
Not open for further replies.
Level 24
Joined
Jul 9, 2009
Messages
4,097
Hi I'm trying to make a map but I'm quite new to doing quests and I've litle idea of how to make them. And I'm trying to make a quest where you turn in 6 items. (and yes I've looked at quest for beginers tutorial) This is how far I've comed a unit enters region X and gets the quest. But I have some problems.

Problem 1: When a unit enters region again he accepts the quest once again.
Problem 2: I dont know how to make a system that keep tracks of how many items you've turned in.
problem 3: I dont know how to make the items getting turned in when a player enters the region again but with an item in the bag.
Problem 4: The hero shall be able to get a new quest from the same person after he completed the old one.
 
1) Use a boolean comparison to check whether the quest is already enabled or not.
  • Trigger
  • Events
    • Unit - A unit enters Quest Region <gen>
  • Conditions
    • (Quest[Player number of (Triggering player)] is enabled) Equal to False
  • Actions
    • Quest - Enable Quest[Player number of (Triggering player)]
Quest is a quest variable (array-ticked).

2) Keep track of how many items the unit has acquired and, when it enters the region, complete the quest:
  • Trigger
  • Events
    • Unit - A unit acquires an item
  • Conditions
    • (Quest[Player number of (Triggering player)] is enabled) Equal to True
    • (Item-type of (Item being manipulated)) Equal to X
  • Actions
    • If (All conditions are true) then do (Actions) else do (Actions)
      • If - Conditions
        • ItemsAcquired[Player number of (Triggering player)] Less than 6
      • Then - Actions
        • Set ItemsAcquired[Player number of (Triggering player)] = (ItemsAcquired[Player number of (Triggering player)] + 1)
      • Else - Actions
ItemsAcquired is an Integer with array variable.

3) Come again? :P
 
Thanks man you're incredible ;)

Anyways what I mean is when a quest item is in the heros backpack and he enters quest region again and then the quests start to stack up turned in quest items.

And you didnt answer number 4 ;)
 
You can also make a quests like (Heroes can't receive quest items only like text... you can put when... WOLF dies, then you make a bolean WOLF_QUEST_ACTIVE and set it TRUE, it has 50% to drop "item" and make WOLF integer variable Wolf +1...
If he "drops that item", show text message "you have acquired |WOLF INTEGER|/Item number needed for quest... and when u do it set QUEST ACTIVE to false...
 
That's because number 4 was not there, when I initially saw the thread :P

Make a quest variable e.g. Quest[1], Quest[2], etc. and use the "GetLocalPlayer() == GetTriggerPlayer() then" script to check if a quest is enabled for the owner of the entering unit.

  • Trigger1
  • Events
    • Unit - A unit enters Quest Region <gen>
  • Conditions
  • Actions
    • Custom script: if GetLocalPlayer() == GetTriggerPlayer() then
    • Set Count[Player number of (Triggering player)] = 0
    • For each (Integer A) from 1 to (Number of quests), do (Actions)
      • Loop - Actions
        • If (All conditions are true) then do (Actions) else do (Actions)
          • If - Conditions
            • (Quest[(IntegerA)] is complete) Equal to True
          • Then - Actions
            • Set Count[Player number of (Triggering player)] = Count[Player number of (Triggering player)] + 1
          • Else - Actions
    • Quest - Enable Quest[(Count[Player number of (Triggering player)] + 1)]
    • Custom script: endif
Number of quests = the maximum number that you are using in the Quest[] variable.

Since we are using GetLocalPlayer(), you can also use Count without array, but I haven't tested it yet, so use this one.
 
Status
Not open for further replies.
Back
Top