• 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.

[General] How to make a quest will give exprience to all players?

Status
Not open for further replies.
Level 7
Joined
Jun 14, 2009
Messages
235
Do you mean give experience to all the heroes/units owned by all players? You could just put them into a group, and give them exp that way.

  • Quest Exp
    • Events
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Heroes and do (Actions)
        • Loop - Actions
          • Hero - Add 1000 experience to (Picked unit), Show level-up graphics
Or you could select each player, then select each unit owned by them that is a hero and do the same, which would not require a specific hero group.
 
Level 7
Joined
Jun 14, 2009
Messages
235
Like I said, you could just make a game wide exp boost for all heroes owned by all players, adding some conditions in as needed. I think this would work.

  • Quest Exp
    • Events
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Unit Group - Pick every unit in (Units owned by (Picked player) matching (((Matching unit) is A Hero) Equal to True)) and do (Actions)
            • Loop - Actions
              • Set Temp_Group = (Units owned by (Picked player) matching (((Matching unit) is A Hero) Equal to True))
              • Unit Group - Pick every unit in Temp_Group and do (Actions)
                • Loop - Actions
                  • Hero - Add 1000 experience to (Picked unit), Show level-up graphics
              • Custom script: call DestroyGroup(udg_Temp_Group)
 
Your trigger leaks and could be simpler usings jass function for destroying groups.
I'm also not sure about that player force, if it does not create another leak someway.
  • Quest Exp
    • Events
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Custom script: set bj_wantDestroyGroup = true
          • Unit Group - Pick every unit in (Units owned by (Picked player) matching (((Matching unit) is A Hero) Equal to True)) and do (Actions)
            • Loop - Actions
              • Custom script: set bj_wantDestroyGroup = true
              • Unit Group - Pick every unit in (Units owned by (Picked player) matching (((Matching unit) is A Hero) and do (Actions)
                • Loop - Actions
                  • Hero - Add 1000 experience to (Picked unit), Show level-up graphics
 
Level 7
Joined
Jun 14, 2009
Messages
235
Your trigger leaks and could be simpler usings jass function for destroying groups.
I'm also not sure about that player force, if it does not create another leak someway.
  • Quest Exp
    • Events
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Custom script: set bj_wantDestroyGroup = true
          • Unit Group - Pick every unit in (Units owned by (Picked player) matching (((Matching unit) is A Hero) Equal to True)) and do (Actions)
            • Loop - Actions
              • Custom script: set bj_wantDestroyGroup = true
              • Unit Group - Pick every unit in (Units owned by (Picked player) matching (((Matching unit) is A Hero) and do (Actions)
                • Loop - Actions
                  • Hero - Add 1000 experience to (Picked unit), Show level-up graphics

He didn't put them int a group, and seemed to want a trigger that applied to all heroes owned by all players. Also I believe that All Players does not leak. But yes, I forgot about that way, been like 5 months.

http://www.hiveworkshop.com/forums/triggers-scripts-269/things-leak-35124/
Note: (All Players) does not leak, and destroying it can result in problems
 
Status
Not open for further replies.
Top