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

[SC2 Editor] Condition for Player Comparison?

Status
Not open for further replies.

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
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.
 
Level 18
Joined
Mar 16, 2008
Messages
721
@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.
Top