• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[SC2 Editor] Condition for Player Comparison?

Status
Not open for further replies.
I can't figure out how to do what in WE would be a player comparison
Trying to spawn different buildings based on the player's race.
These are contradictory since in WC3 World Editor a player comparison compared players and not player races. In StarCraft II the player comparison was replaced with an integer comparison since players are treated as integers rather than a unique type.

Similar to Warcraft III, there is likely a function that returns the race assigned to a player given a value representing a player. The returned value will likely be a string wrapped as a race data link. This means string comparison if using galaxy directly, otherwise GUI should hopefully automatically perform a comparison of the appropriate data type.
 
@deepstrasz i made a post elsewhere but I like this website/community more, so I figured to also post here to support/encourage this community. kind of a shame sc2 editor is so complicated.

@Dr Super Good oh that is surprisingly simple, below seems to work in my test.
  • (Race of player 1) == Terran
1634585763540.png
 
Status
Not open for further replies.
Back
Top