• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[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,207
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