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

[Trigger] My Quest reward is bugged

Status
Not open for further replies.
Level 10
Joined
Jan 24, 2009
Messages
606
  • Finish Quest
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • FarmerJoe Equal to 1
      • (Target unit of issued order) Equal to Farmer Joe 0025 <gen>
      • Or - Any (Conditions) are true
        • Conditions
          • (Owner of (Triggering unit)) Equal to Player 1 (Red)
          • (Owner of (Triggering unit)) Equal to Player 2 (Blue)
          • (Owner of (Triggering unit)) Equal to Player 3 (Teal)
          • (Owner of (Triggering unit)) Equal to Player 4 (Purple)
          • (Owner of (Triggering unit)) Equal to Player 5 (Yellow)
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Player Group - Pick every player in (All players controlled by a User player) and do (Actions)
        • Loop - Actions
          • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Picked unit) is A Hero) Equal to True
                  • (Owner of (Picked unit)) Not equal to Player 10 (Light Blue)
                  • (Owner of (Picked unit)) Not equal to Neutral Passive
                • Then - Actions
                  • Hero - Add 200 experience to (Picked unit), Show level-up graphics
                  • Item - Create Crown of Kings +5 at (Position of (Picked unit))
                  • Wait 0.10 seconds
                  • Item - Change ownership of (Last created item) to (Owner of (Picked unit)) and Retain color
                  • Quest - Disable (Last created quest)
                  • Set WelcomeAll = 1
                  • Set FarmerJoe = 2
                  • Trigger - Turn off (This trigger)
                • Else - Actions
can any1 tell me whats wrong here?? cuse when it's done in map it gives more XP then it is supose to and The Item is 5 instead of 1.... please help:p

BTW the Variable's are Interegers
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
You loop for all players and for all units. As the unit loop condition does not vary for each player, it runs the loop through all units on map for every controler controled player ingame. Thus if there are 2 players it will make 2 items etc.

Simply get rid of the player loop to fix.

I also advise removing all the leaks, no one wants to play a leaky map.
 
Status
Not open for further replies.
Top