• 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.
  • It's time for the first HD Modeling Contest of 2025. Join the theme discussion for Hive's HD Modeling Contest #7! 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 64
Joined
Jan 18, 2005
Messages
27,264
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 64
Joined
Jan 18, 2005
Messages
27,264
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