In my map I want to give the player units that belong to him but that he cannot control nor do these units share their vision with the player (I want the units to be able to see enemies but I don't want the player to see what these units see.
I managed to make these units uncommandable through behaviors, but I have NO IDEA HOW TO FORCE A PLAYER to not be able to see units that belong to him. Please help me out because this is a critical need for what I want to accomplish (My map has 14 players, so I can't use dummy players that "fake" being the human player, they must belong to him and the player must not be able to see these specific units).
Additional information:
1) These units are stored in a unit group.
I have made zero advances in using the data editor to take away player vision from certain units.
In the trigger editor using "Unshare Vision of Unit" doesn't work if the player owns the unit (What's the purpose of this useless action I wonder?)
If I use Unshare Vision of Player 1 with Player 1, player 1 no longer sees his units, and if I then use share vision of unit (The particular unit I want him to see) the game doesn't share vision of this unit because apparently Player 1 Can't see what he should be able to see (So it is a global function sorta). So this method doesn't work either.
This means I also can't Unshare Vision of the Player and share the vision of the next player to him because even if the player has vision shared with the next player he can't see because he can't see what he sees (The idea is to Unshare Vision of Player 1 towards Player 1 and then Share Vision of Player 1 towards Player 2 and then sharing vision of the units player 1 should see with Player 2 (Since Player 1 can see what player two does but can't see what Player 1 sees), but since Player 1 can't see what player 1 sees, even if Player 1 can see what player 2 sees, player 1 can't see what player 1 sees to begin with, meaning he can't see what player 2 sees.
I am between a rock and a hard place. I'm so bad at this.
God I wish I wasn't so bad at map making, I can't even figure out something as simple as how to disable unit vision sharing with controlling player D;
These units belong to the player. But in the game the player never knows he controls these units (They are his allies). The player gets to see and control units in another unit group.
I am not trolling at all, I can even show you the map if you are not convinced. Thanks for the trigger description tip, I'll read them next time I have problems.
But I still really need help in finding out how to take away vision of a player from certain units he owns. (I swear I'm not trolling)
Here's my map, for testing purposes I have revealed a good part of it so I can see what is going on when testing triggers/data changes.
It currently has a setup where these "minion units" are summoned in areas which are a distance away from the player they belong to (They are not meant to be "his" units, those are allied monsters of his species which do not attack him, and follow him if the players' active units (The ones he can control and see) come near the minions.
The triggers for the minion units are under Extra > Demos > MinionMonsterDemo folders. I gave them a behavior which makes them uncommandable, and I will also eventually also make them weaker than active player units, since I want to have a lot of them but don't want them to overpower players' active units.
Are you talking about like in the campaign where the player comes across stray units that become his; this is just done with neutral units that then change ownership when you approach.
Again why do they even have to be his units when he's not even able to see or intentionally control them.
You can only do this if you create the unit for the neutral player or some other computer player. The player's own units will always be visible to the player no matter what.
Are you talking about like in the campaign where the player comes across stray units that become his; this is just done with neutral units that then change ownership when you approach.
Again why do they even have to be his units when he's not even able to see or intentionally control them.
No, I'll try to explain as clearly as possible since I am doing something complicated. In my 14 player map, I want players to control a small amount of monster units (Zergs and Critters) to gather food (Bio Mass) to grow their small pack in number and gain upgrade points. But I also want the map to have a lot of monsters and try to simulate a mini ecosystem (Badly designed by your truly). Players will have their monsters all over the map, but they will act independently of the player except for a few units which are stronger and under the player's control (A more of an RPGish, micro type gameplay), the other weaker monsters would be killing fodder and food sources for other players (Monster leave "meat" behind when they die) and would attack certain objectives automatically when they come up (And have each player have these types of monsters all around the map). I wanted these monsters to share the same alliances as the player who the monsters are friendly to so I figured I might make the monsters belong to the player so I don't have to setup who they are hostile towards using triggers (Since I ran out of player space).
TL'DR (I ramble a lot to the point where nothing makes sense), each player has personal minions like in a MOBA (He can't control them, but they help him) and these minions don't run around in lanes, they just hang out in a random part of the map and follow the player if the player finds them. They are weaker and have energy (Units lose energy when moving/attacking) so they stop following if they are low on energy (Players can't raise huge armies over time).
It's my first map so I'm experimenting/screwing around more than I probably should, sorry for not being clear on what I wanted to do.
You can only do this if you create the unit for the neutral player or some other computer player. The player's own units will always be visible to the player no matter what.
Thanks for the response caparosmith, I was afraid this might be the case, luckily I think I can apply my "[Same Player] Unit Group Self Hostility Demo" which allows units from the same player attack each other using unit groups (I use a periodic event trigger which counts every unit (Main) in a unit group, looks for nearby valid units from another unit group which I deem hostile and order it to attack the unit in such unit group who's position is closest to the position of the unit (Main). I'm afraid it might contribute lag to my map, but now that I know it is impossible to deshare vision of a player's own units, I think this is the only route I can take.
Would it be bad if players knew only where the monsters themselves are? You could give them a vision range of 0 and use aura searches or triggers to replace standard targeting.
Also, are alliances dynamic in your map or do you have fixed teams? For the latter you could at least give all minions to one member (for 2 teams an AI each would be feasible), and just cheat with teamcolor events to make them look like they belong to different players.
You could also try implementing your "self-hostility" setup in Data, which might reduce lag. As far as I know triggers can apply buffs and define their source, so you could give all minions to Hostile and "mark" them with a buff via trigger to determine "ownership". Said buff should then be able to run an aura search with alliances drawn from the "caster" player from the trigger.
I'd prefer it if players didn't know where these monsters are (Already fixed this by making Player 0 own all minions, using 1 variable array and 2 triggers to script minion attack behavior, I no longer need to worry about vision).
I currently plan to make my game a Free For All (You Vs Everyone, 1 player per team)
I am having trouble understanding the third paragraph. I do know I can define buff sources in triggers (From either a player or a unit). The thing where I get lost is:
-Giving Minions to Hostile (Player 15), wouldn't that cause them to attack the player they should consider an ally?
-You can define alliances for a single unit using some sort of "aura search", or is it an area search?
-How do you refer to the source in a data effect? (In this case some sort of Buff behavior launches an Area Search Effect?, how does the Area Search Effect use the source of the behavior?
I am super bad with data, so this sounds like a good thing to learn.
I don't know the trigger side sadly. With "aura search" I mean a Search Area effect executed periodically via a Create Persistent effect or a Buff behavior (which essentially do the same, only the buff requires a unit to host it). This is how Warcraft 3 -style "aura" type abilities are implemented, such as the Mothership cloak field. For a proximity trigger (landmine or default aggro mechanics) you can also use Enumerate Area validators but I don't know their refresh rate. All of these would serve to replace a "unit comes within range" type trigger, because people keep saying constantly running triggers cause lag. I have no idea whether this is true though.
There's a general "scope" system which effects, actors, validators etc. use to refer to certain units within one ability cast. Common field names are Location, Target, Unit and a few others (...Host for actors turns up quite a bit, comparison validators will have Other Unit too).
Think of the Mutalisk attack: the muta spits out his wurm, and after hitting the target it bounces to another unit. In the data these are actually two separate "wurm" projectiles, and the second one is set to launch from the Target scope of the first (or equivalent reference). The next bounce can then be launched from the Target of the second impact. If instead you wanted the mutalisk to spit multiple wurms in quick succession, you could set each missile to launch from the Caster of the effects, this is always the unit which initially triggered the Ability or Weapon. You can also specify an effect from which to evaluate the scope, for example you could make the second mutalisk "bounce" launch from the initial target like the first. Source usually is the previous unit or point which hosted an effect: at the beginning this will be equal to the Caster, with a bounce/chain lightning attack this will be the previous target.
For your problem my idea was to use the search filters from the scope of the supposed "owner" of the minion. Like, when an Archon attacks it doesn't damage friendly units, because the splash filter excludes allies. These filters usually draw from the Caster scope, which should be set via trigger. Or again the Mothership cloak field, which doesn't work on enemies: if you apply the main Buff behavior (the one on the Mothership itself) to the ship via a trigger, but set the source to another player, who is an enemy of the Mothership owner, the Mothership should now cloak units owned by that enemy player and his allies (and still those of the owner+allies unless you remove the buff from the Mothership unit in the data tab as well)
Then just make this area search apply an Issue Order effect to attack any unit in range (the filters are on the search), with a few additional checks so it isn't too easy to trick. For example you could "remember" the point where the unit first met an enemy (Create Persistent effect at Caster Point scope) and use a Location Range validator to define a "leash range", if the target moves too far away the minion will stop chasing. Pretty much any advanced behavior will require additional effect chains, before working on that you should settle exactly how you want the minion to behave.
Without further work you can only issue direct Attack orders on supposed enemies, so the minion will keep following its target until the actual owning player loses sight of it or the minion is given a different order (with "override order queue" option enabled). Minions could easily be pulled into static defenses or other pre-placed "killzones" with this behavior, and would quickly run out of "energy" chasing targets they can never catch. Or if the above aura setup constantly gives new attack orders they could quickly be made to zigzag between two player-owned enemies by abusing search priorities.
I see what you mean about complex behavior through effects (Those examples are spot on, I actually understood them). Complex effect setups in data sounds scary as hell to implement (I'll have to keep reading tutorials on those and learn steadily to avoid burn out).
Using few triggers I was able to script a basic system which I believe satisfies what I want the "minions" to do (It basically makes them attack the closest valid enemy (Literally). My mind is incredibly trigger focused (Because of my previous map editor experience with another game which had no "data" aspect.
Seems that making an imitation of my Trigger Hostility Setup through data might be very hectic and convoluted attempt (I'd have to create an aggro buff for every player if what I am thinking is correct. This probably because I am using the "While" function HEAVILY on my map to cover all 14 players with ease (It was initially a humble 6 player map, until I came across the dark arts and found out I could force a player to hit / kill himself through triggers and figured I could squeeze in more players just for kicks).
After writing that first paragraph I am now brainstorming about a data / effect system (In which ALL units have Behavior X) where ONLY units OWNED by player 0 search for any unit who's Behavior X's source player does not match the caster's (If Unit A's Behavior X's source player [Player 1] sees a unit who's Behavior X's source player is not player 1, he will attack it if it is the closest unit one who meets the criteria.
Is the previous paragraph possible (And practical for a newbie to implement)?
P.S. Thanks for the large detailed posts, they are really useful.
make replica units of the units you want, have them uncommandable, set their vision to 0, set their minimap size to 0. It should make them unable to be seen by the player.
Now give them a buff that has a periodic search area effect, and make the search area cast an attack command on the target. Set the filters of the search area to be what you want. Then give them the wander buff to walk around and such, maybe edit it to make them walk further away.
For the rest of your events use triggers, or give the player some sort of "call swarm" ability that signals all nearby units to focus the players objective, or however you want it to happen.
In theory this should work, but I promise nothing.
Rollback Post to RevisionRollBack
Zergling Blood : starcraft://map/1/35684
Game of Thrones : starcraft://map/1/189756
Tacticraft : starcraft://map/1/223625
I'm not sure you can grab the caster references, as the Scope system is normally limited to one chain of effects (each mutalisk attack has its own set of bounces)
My idea was to define one scope via trigger, and then have that buff do all the searching etc. The minion wouldn't be owned by the player, but in a sense the buff controlling its behavior is. Looking through the validators there doesn't seem to be anything to compare alliance between two arbitrary units, at least the Other Unit+ field on Unit Filter validators doesn't seem to do this.
You could of course make one unique behavior for each player, apply it via trigger and then use standard "compare behavior count" checks, but that can't check for player alliances. Unit filters on Search Area and Damage effects always seem to use their Caster scope as the source for alliance checks (mutalisk attacks bounce to enemies of the mutalisk owner, I don't know any way to make them instead bounce to, say, allies of the initial target)
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
In my map I want to give the player units that belong to him but that he cannot control nor do these units share their vision with the player (I want the units to be able to see enemies but I don't want the player to see what these units see.
I managed to make these units uncommandable through behaviors, but I have NO IDEA HOW TO FORCE A PLAYER to not be able to see units that belong to him. Please help me out because this is a critical need for what I want to accomplish (My map has 14 players, so I can't use dummy players that "fake" being the human player, they must belong to him and the player must not be able to see these specific units).
Additional information: 1) These units are stored in a unit group.
I have made zero advances in using the data editor to take away player vision from certain units.
In the trigger editor using "Unshare Vision of Unit" doesn't work if the player owns the unit (What's the purpose of this useless action I wonder?)
If I use Unshare Vision of Player 1 with Player 1, player 1 no longer sees his units, and if I then use share vision of unit (The particular unit I want him to see) the game doesn't share vision of this unit because apparently Player 1 Can't see what he should be able to see (So it is a global function sorta). So this method doesn't work either.
This means I also can't Unshare Vision of the Player and share the vision of the next player to him because even if the player has vision shared with the next player he can't see because he can't see what he sees (The idea is to Unshare Vision of Player 1 towards Player 1 and then Share Vision of Player 1 towards Player 2 and then sharing vision of the units player 1 should see with Player 2 (Since Player 1 can see what player two does but can't see what Player 1 sees), but since Player 1 can't see what player 1 sees, even if Player 1 can see what player 2 sees, player 1 can't see what player 1 sees to begin with, meaning he can't see what player 2 sees.
I am between a rock and a hard place. I'm so bad at this.
God I wish I wasn't so bad at map making, I can't even figure out something as simple as how to disable unit vision sharing with controlling player D;
Deleted
Troll much?
And the purpose of hiding a players own unit is?
Your really should try reading the description of triggers actions as "share vision of unit" only works between players.
These units belong to the player. But in the game the player never knows he controls these units (They are his allies). The player gets to see and control units in another unit group.
I am not trolling at all, I can even show you the map if you are not convinced. Thanks for the trigger description tip, I'll read them next time I have problems.
But I still really need help in finding out how to take away vision of a player from certain units he owns. (I swear I'm not trolling)
Here's my map, for testing purposes I have revealed a good part of it so I can see what is going on when testing triggers/data changes.
It currently has a setup where these "minion units" are summoned in areas which are a distance away from the player they belong to (They are not meant to be "his" units, those are allied monsters of his species which do not attack him, and follow him if the players' active units (The ones he can control and see) come near the minions.
The triggers for the minion units are under Extra > Demos > MinionMonsterDemo folders. I gave them a behavior which makes them uncommandable, and I will also eventually also make them weaker than active player units, since I want to have a lot of them but don't want them to overpower players' active units.
Are you talking about like in the campaign where the player comes across stray units that become his; this is just done with neutral units that then change ownership when you approach.
Again why do they even have to be his units when he's not even able to see or intentionally control them.
@wisesquirrel: Go
You can only do this if you create the unit for the neutral player or some other computer player. The player's own units will always be visible to the player no matter what.
No, I'll try to explain as clearly as possible since I am doing something complicated. In my 14 player map, I want players to control a small amount of monster units (Zergs and Critters) to gather food (Bio Mass) to grow their small pack in number and gain upgrade points. But I also want the map to have a lot of monsters and try to simulate a mini ecosystem (Badly designed by your truly). Players will have their monsters all over the map, but they will act independently of the player except for a few units which are stronger and under the player's control (A more of an RPGish, micro type gameplay), the other weaker monsters would be killing fodder and food sources for other players (Monster leave "meat" behind when they die) and would attack certain objectives automatically when they come up (And have each player have these types of monsters all around the map). I wanted these monsters to share the same alliances as the player who the monsters are friendly to so I figured I might make the monsters belong to the player so I don't have to setup who they are hostile towards using triggers (Since I ran out of player space).
TL'DR (I ramble a lot to the point where nothing makes sense), each player has personal minions like in a MOBA (He can't control them, but they help him) and these minions don't run around in lanes, they just hang out in a random part of the map and follow the player if the player finds them. They are weaker and have energy (Units lose energy when moving/attacking) so they stop following if they are low on energy (Players can't raise huge armies over time).
It's my first map so I'm experimenting/screwing around more than I probably should, sorry for not being clear on what I wanted to do.
Thanks for the response caparosmith, I was afraid this might be the case, luckily I think I can apply my "[Same Player] Unit Group Self Hostility Demo" which allows units from the same player attack each other using unit groups (I use a periodic event trigger which counts every unit (Main) in a unit group, looks for nearby valid units from another unit group which I deem hostile and order it to attack the unit in such unit group who's position is closest to the position of the unit (Main). I'm afraid it might contribute lag to my map, but now that I know it is impossible to deshare vision of a player's own units, I think this is the only route I can take.
Would it be bad if players knew only where the monsters themselves are? You could give them a vision range of 0 and use aura searches or triggers to replace standard targeting.
Also, are alliances dynamic in your map or do you have fixed teams? For the latter you could at least give all minions to one member (for 2 teams an AI each would be feasible), and just cheat with teamcolor events to make them look like they belong to different players.
You could also try implementing your "self-hostility" setup in Data, which might reduce lag. As far as I know triggers can apply buffs and define their source, so you could give all minions to Hostile and "mark" them with a buff via trigger to determine "ownership". Said buff should then be able to run an aura search with alliances drawn from the "caster" player from the trigger.
I'd prefer it if players didn't know where these monsters are (Already fixed this by making Player 0 own all minions, using 1 variable array and 2 triggers to script minion attack behavior, I no longer need to worry about vision).
I currently plan to make my game a Free For All (You Vs Everyone, 1 player per team)
I am having trouble understanding the third paragraph. I do know I can define buff sources in triggers (From either a player or a unit). The thing where I get lost is:
-Giving Minions to Hostile (Player 15), wouldn't that cause them to attack the player they should consider an ally?
-You can define alliances for a single unit using some sort of "aura search", or is it an area search?
-How do you refer to the source in a data effect? (In this case some sort of Buff behavior launches an Area Search Effect?, how does the Area Search Effect use the source of the behavior?
I am super bad with data, so this sounds like a good thing to learn.
@wisesquirrel: Go
I don't know the trigger side sadly. With "aura search" I mean a Search Area effect executed periodically via a Create Persistent effect or a Buff behavior (which essentially do the same, only the buff requires a unit to host it). This is how Warcraft 3 -style "aura" type abilities are implemented, such as the Mothership cloak field. For a proximity trigger (landmine or default aggro mechanics) you can also use Enumerate Area validators but I don't know their refresh rate. All of these would serve to replace a "unit comes within range" type trigger, because people keep saying constantly running triggers cause lag. I have no idea whether this is true though.
There's a general "scope" system which effects, actors, validators etc. use to refer to certain units within one ability cast. Common field names are Location, Target, Unit and a few others (...Host for actors turns up quite a bit, comparison validators will have Other Unit too).
Think of the Mutalisk attack: the muta spits out his wurm, and after hitting the target it bounces to another unit. In the data these are actually two separate "wurm" projectiles, and the second one is set to launch from the Target scope of the first (or equivalent reference). The next bounce can then be launched from the Target of the second impact. If instead you wanted the mutalisk to spit multiple wurms in quick succession, you could set each missile to launch from the Caster of the effects, this is always the unit which initially triggered the Ability or Weapon. You can also specify an effect from which to evaluate the scope, for example you could make the second mutalisk "bounce" launch from the initial target like the first. Source usually is the previous unit or point which hosted an effect: at the beginning this will be equal to the Caster, with a bounce/chain lightning attack this will be the previous target.
For your problem my idea was to use the search filters from the scope of the supposed "owner" of the minion. Like, when an Archon attacks it doesn't damage friendly units, because the splash filter excludes allies. These filters usually draw from the Caster scope, which should be set via trigger. Or again the Mothership cloak field, which doesn't work on enemies: if you apply the main Buff behavior (the one on the Mothership itself) to the ship via a trigger, but set the source to another player, who is an enemy of the Mothership owner, the Mothership should now cloak units owned by that enemy player and his allies (and still those of the owner+allies unless you remove the buff from the Mothership unit in the data tab as well)
Then just make this area search apply an Issue Order effect to attack any unit in range (the filters are on the search), with a few additional checks so it isn't too easy to trick. For example you could "remember" the point where the unit first met an enemy (Create Persistent effect at Caster Point scope) and use a Location Range validator to define a "leash range", if the target moves too far away the minion will stop chasing. Pretty much any advanced behavior will require additional effect chains, before working on that you should settle exactly how you want the minion to behave.
Without further work you can only issue direct Attack orders on supposed enemies, so the minion will keep following its target until the actual owning player loses sight of it or the minion is given a different order (with "override order queue" option enabled). Minions could easily be pulled into static defenses or other pre-placed "killzones" with this behavior, and would quickly run out of "energy" chasing targets they can never catch. Or if the above aura setup constantly gives new attack orders they could quickly be made to zigzag between two player-owned enemies by abusing search priorities.
I see what you mean about complex behavior through effects (Those examples are spot on, I actually understood them). Complex effect setups in data sounds scary as hell to implement (I'll have to keep reading tutorials on those and learn steadily to avoid burn out).
Using few triggers I was able to script a basic system which I believe satisfies what I want the "minions" to do (It basically makes them attack the closest valid enemy (Literally). My mind is incredibly trigger focused (Because of my previous map editor experience with another game which had no "data" aspect.
Seems that making an imitation of my Trigger Hostility Setup through data might be very hectic and convoluted attempt (I'd have to create an aggro buff for every player if what I am thinking is correct. This probably because I am using the "While" function HEAVILY on my map to cover all 14 players with ease (It was initially a humble 6 player map, until I came across the dark arts and found out I could force a player to hit / kill himself through triggers and figured I could squeeze in more players just for kicks).
After writing that first paragraph I am now brainstorming about a data / effect system (In which ALL units have Behavior X) where ONLY units OWNED by player 0 search for any unit who's Behavior X's source player does not match the caster's (If Unit A's Behavior X's source player [Player 1] sees a unit who's Behavior X's source player is not player 1, he will attack it if it is the closest unit one who meets the criteria.
Is the previous paragraph possible (And practical for a newbie to implement)?
P.S. Thanks for the large detailed posts, they are really useful.
@wisesquirrel: Go
make replica units of the units you want, have them uncommandable, set their vision to 0, set their minimap size to 0. It should make them unable to be seen by the player.
Now give them a buff that has a periodic search area effect, and make the search area cast an attack command on the target. Set the filters of the search area to be what you want. Then give them the wander buff to walk around and such, maybe edit it to make them walk further away.
For the rest of your events use triggers, or give the player some sort of "call swarm" ability that signals all nearby units to focus the players objective, or however you want it to happen.
In theory this should work, but I promise nothing.
@wisesquirrel: Go
I'm not sure you can grab the caster references, as the Scope system is normally limited to one chain of effects (each mutalisk attack has its own set of bounces)
My idea was to define one scope via trigger, and then have that buff do all the searching etc. The minion wouldn't be owned by the player, but in a sense the buff controlling its behavior is. Looking through the validators there doesn't seem to be anything to compare alliance between two arbitrary units, at least the Other Unit+ field on Unit Filter validators doesn't seem to do this.
You could of course make one unique behavior for each player, apply it via trigger and then use standard "compare behavior count" checks, but that can't check for player alliances. Unit filters on Search Area and Damage effects always seem to use their Caster scope as the source for alliance checks (mutalisk attacks bounce to enemies of the mutalisk owner, I don't know any way to make them instead bounce to, say, allies of the initial target)