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

Need help with player group

Status
Not open for further replies.
Level 4
Joined
Nov 18, 2021
Messages
41
Hello!
I'm trying to make it so that when a player finishes research if is finished for his allies as well.
For test I use armor plating. I have light blue and teal footman on the map and allied them, but when I run this, their armor does not increase.
When I remove group and change picked player to light blue or teal it works no problem
I also have blue enemy and when I use all players it upgrades his armor but still no armor for teal and lb(
1637436321902.png

The forces are below, maybe I did something wrong there?

1637436571942.png


But they are considered allies in the game though
1637436634911.png
 
Level 4
Joined
Nov 18, 2021
Messages
41
You have an empty "if", there is no "condition" in it. Maybe you should put "(picked player) not equal to owner of (triggering unit)" there?
there was this before, but it only excludes me, it does not affect allies. I need it to register allies though. Removed it temporarily fir the testing
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
This works fine for me:
  • Research
    • Events
      • Unit - A unit Finishes research
    • Conditions
    • Actions
      • Set VariableSet TempPG = (All allies of (Owner of (Triggering unit)).)
      • Player Group - Remove (Owner of (Triggering unit)) from TempPG.
      • Player Group - Pick every player in TempPG and do (Actions)
        • Loop - Actions
          • Player - Set the current research level of (Researched tech-type) to ((Current research level of (Researched tech-type) for (Picked player)) + 1) for (Picked player)
      • Custom script: call DestroyForce (udg_TempPG)

Also, you don't need Do nothing in If Then Else statements that use multiple functions. It's no different from a Comment:
  • Do nothing
 
Level 4
Joined
Nov 18, 2021
Messages
41
ok, I've found out the problem. Apparently, teal and light blue were not included as actual players in test map, only red and blue for some reason. When I published it, it worked perfectly.
 
Status
Not open for further replies.
Top