Hi SC2Mapster, long time lurker and Melee map maker here.
I'm making my first non-melee map and needless to say I'm using triggers. I've been trying to solve this problem for about a week now and while it hasn't halted development of my map it has made it rather annoying to play in the beginning. You see my trigger, which I will post below, is designed to show a last created unit to only the owner of that unit. I have the unit for each player spawn in the exact same location, have all units last created flagged with the hidden attribute and then revealed for the picked player who is flagged as owned as that unit. Now when my testers and I play the map, all buildings will spawn in the right location on top of each other, but all players can see all spawned structures and then the structures proceed to go color rainbow happy with z-fighting polygons and what not. The trigger I've made is below:
Put your triggers into code tags, please. It's much more convenient to read them then.
To add code tags into your post simply click on the button at the top of the edit window.
Right, now to your trigger.
The problem is that you cannot hide a unit for just a single player. You can only hide or show them for everyone.
The only way to show each player their own structures is, I think, to make every unit cloaked and give no unit in the game Detection.
Of course you have to fight with the nasty side-effects, such as semi-transparent units.
You can't turn a flag for a specific player. Then again the correct action to use to hide a building is "Show/Hide unit". (but you can't hide for a specific player either)
You should do what Ruzial said.
Thanks s3rius, I was wondering what that button did.
Well, my intention is to save space by having several buildings in a single space shown to only the owning player. That's my main intention. And if that's impossible I would love for a great alternative.
I do not want 1 player to choose an upgrade and the whole team gets the upgrade Ruzial. I want players to choose their own upgrades as they progress through the mission. It is a co-op map. Just so we're clear here.
EDIT: Actually, can everyone upgrade from a single building without having upgrades of one player affecting another (i.e. Player 1 gets cloak, no one else gets it until they decide to do the same)
I'm guessing offhand that if you create some clever requirements and place all upgrades of one type on top of eachother, then use interact you might be able to. I'm not sure if you get requirements based on player number thou
I could but it sounds like a more complicated way of doing things. I was sure an array could do what I'm originally intending.
I might end up doing it the old fashioned way of just placing each player's building manually next to each other in a grid like fashion, this is not desired by myself because my map is already kinda cramped as it is. :(
EDIT: I've since then just did the 'traditional way', I guess all I can do is ask Blizzard to implement a 'hide from player or player group' trigger.
You could do something like an item shop with upgrades instead of items. I don't know if that would work though, never tried to make one, but you should take a look at the tutorial about it.
Hi SC2Mapster, long time lurker and Melee map maker here.
I'm making my first non-melee map and needless to say I'm using triggers. I've been trying to solve this problem for about a week now and while it hasn't halted development of my map it has made it rather annoying to play in the beginning. You see my trigger, which I will post below, is designed to show a last created unit to only the owner of that unit. I have the unit for each player spawn in the exact same location, have all units last created flagged with the hidden attribute and then revealed for the picked player who is flagged as owned as that unit. Now when my testers and I play the map, all buildings will spawn in the right location on top of each other, but all players can see all spawned structures and then the structures proceed to go color rainbow happy with z-fighting polygons and what not. The trigger I've made is below:
I've run into a huge wall and any help in getting it where players can only see their own structures will be much appreciated.
Put your triggers into code tags, please. It's much more convenient to read them then.
To add code tags into your post simply click on the button at the top of the edit window.
Right, now to your trigger.
The problem is that you cannot hide a unit for just a single player. You can only hide or show them for everyone.
The only way to show each player their own structures is, I think, to make every unit cloaked and give no unit in the game Detection.
Of course you have to fight with the nasty side-effects, such as semi-transparent units.
What do you want the buildings to do? Because if they all share a common trait (ie global team upgrade) you can use an interact ability
Thanks s3rius, I was wondering what that button did.
Well, my intention is to save space by having several buildings in a single space shown to only the owning player. That's my main intention. And if that's impossible I would love for a great alternative.
I do not want 1 player to choose an upgrade and the whole team gets the upgrade Ruzial. I want players to choose their own upgrades as they progress through the mission. It is a co-op map. Just so we're clear here.
EDIT: Actually, can everyone upgrade from a single building without having upgrades of one player affecting another (i.e. Player 1 gets cloak, no one else gets it until they decide to do the same)
I'm guessing offhand that if you create some clever requirements and place all upgrades of one type on top of eachother, then use interact you might be able to. I'm not sure if you get requirements based on player number thou
I could but it sounds like a more complicated way of doing things. I was sure an array could do what I'm originally intending.
I might end up doing it the old fashioned way of just placing each player's building manually next to each other in a grid like fashion, this is not desired by myself because my map is already kinda cramped as it is. :(
EDIT: I've since then just did the 'traditional way', I guess all I can do is ask Blizzard to implement a 'hide from player or player group' trigger.
There is a way to show a unit for the owning player.
But this doas only work if the players haven't shared vision.
For this, you have to set the Buried and the Cloak Flags.
Then your Unit is cloaked without the blue cloak glow...
Cheers Then