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

[Need Info] Buttons for everyone!

Status
Not open for further replies.
Level 8
Joined
Oct 2, 2013
Messages
288
How do you give a unit buttons that everyone or a specific set of players can select?

For example: A building where you can click different buttons that are only available for allied players.

Thanks a lot in advance!
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,191
The usual method is to make separate buildings for all players and use triggers to link them in such a way they act as a single building shared by all players.

One could try messing around with ownership changes when nearby but that might not work well in some maps.
 
Level 8
Joined
Oct 2, 2013
Messages
288
Thanks once again Dr Super Good!

I like the solution of making seperate buildings. It feels similar to Warcraft 3 methods.
My idea then will be to make a dummy for each player to be selected, all located at the building. I hope dummies aren't too difficult to work with in Starcraft.
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,191
Hide the actors for all but the owner (not sure how but must be possible). That way each player has their own building showing. so can be clicked on immediately (no triggers needed). If the buildings should be killable either link all of them together with the conjoined behaviour (used on the trains in WoL and the engines in HotS) or have it that the not visible "actual building" unit is the only one that can take damage (all rest are invulnerable).
 
Status
Not open for further replies.
Top