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

Quests not working

Status
Not open for further replies.
Level 7
Joined
May 21, 2009
Messages
289
In my ORPG, my quests work, but not quite like they are supposed to. When the first player uses the quest, it seems to work fine, but some players that try to get/or/return quests aren't allowed to? Could someone look over this example of one quest thats not working and tell me whats wrong?

-Get Quest-

  • Rat Killer
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • (Target unit of issued order) Equal to The Prophet 0623 <gen>
      • Quest_Prophet[(Player number of (Triggering player))] Equal to 0
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Set Quest_Prophet[(Player number of (Triggering player))] = 1
      • Game - Display to (Player group((Owner of (Triggering unit)))) the text: |c000042FFThe Proph...
-Kill Rats-

  • Rat Killing
    • Events
      • Unit - A unit Dies
    • Conditions
      • Quest_Prophet[(Player number of (Owner of (Killing unit)))] Equal to 1
      • Q1P[(Player number of (Owner of (Killing unit)))] Less than 10
      • (Unit-type of (Triggering unit)) Equal to Giant Rat
    • Actions
      • Set Q1P[(Player number of (Owner of (Killing unit)))] = (Q1P[(Player number of (Owner of (Killing unit)))] + 1)
      • Game - Display to (Player group((Owner of (Killing unit)))) the text: ((String(Q1P[(Player number of (Owner of (Killing unit)))])) + Rats slain.)
-Return Quest-

  • Rat Killer C
    • Events
      • Unit - A unit comes within 300.00 of The Prophet 0623 <gen>
    • Conditions
      • Quest_Prophet[(Player number of (Triggering player))] Equal to 1
      • Q1P[(Player number of (Owner of (Killing unit)))] Greater than or equal to 10
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Set Quest_Prophet[(Player number of (Triggering player))] = 2
      • Game - Display to (Player group((Owner of (Triggering unit)))) the text: |c000042FFThe Proph...
      • Player - Add 100 to (Owner of (Triggering unit)) Current gold
      • Hero - Add 350 experience to (Triggering unit), Show level-up graphics
      • Player - Add 1 to (Owner of (Triggering unit)) Food used
 
Level 7
Joined
May 3, 2007
Messages
210
Why do you use (Owner of (Killing Unit)) when your event is A unit comes within 300 . . .

In the return portion. Change it to Triggering Unit.

I imagine (and this is just a throwing a monkey wrench into a dark room) that because Killing Unit doesn't reference anything it returns null, and when you're returning an integer of a null handle pointer, the GUI probably just evaluates it to 0, which is odd that it works for even Player 1 then, since in GUI the player number of number 1 is 1, not 0. But who knows, see if that works.
 
Level 13
Joined
Jul 26, 2008
Messages
1,009
First off there is no "Triggering Player" as the thing triggering the event is a unit. You will want to do (Player Number of (Owner of(Triggering Unit))). Remember to do this for Unit triggered events, and to do Triggering Player for Player Triggered events.

Also in the first trigger series you're doing Player 1, and in the second you're doing Player 2 (0 = P1, 1 = P2).

lol and Phoenix is right.

Now try those modifications out, tell me the outcome, and if problems persist repost the trigger.
 
Status
Not open for further replies.
Top