hi. im making a deception-style map where one of the players has zerg powers and uses them covertly to kill the others... on problem. im using a submenu to get to the zerg abilities and for some reason when u click on the zerg player (even if it is owned by another player) you can see the open submenu button. its really annoying and I don't know how to fix it. you can even click on it. this is the only button that this is happening with. if you click on it while its not under your control, you open a blank submenu. does anyone know what I did wrong?
You need a way to validate if the player who has the zerg powers is actually the one clicking on his own buildings. You could achieve this by adding the zerg power player to a player variable, lets call the variable "OPzergedplayer". Once you have set the proper player to "OPzergplayer" you can then use an if / then / else statement saying
If - (OPzergdplayer) selects (any) unit owned by (OPzergdplayer)
Then - Show (sub menu button) to (OPzergdplayer) + whatever other actions you do here
Else - whatever other actions you do here
This way only the person who is the zerg player can see the button, and you can change the variable to be another player if you have a round system, i did this off the top of my head so specific wording in the editor may be different.
If you have already done this then we will need more information, such as posting the code that you wrote so people can take a look at it and see if you made any glaring errors, Hope this helps.
hi. im making a deception-style map where one of the players has zerg powers and uses them covertly to kill the others... on problem. im using a submenu to get to the zerg abilities and for some reason when u click on the zerg player (even if it is owned by another player) you can see the open submenu button. its really annoying and I don't know how to fix it. you can even click on it. this is the only button that this is happening with. if you click on it while its not under your control, you open a blank submenu. does anyone know what I did wrong?
-resolved-
@joey101d: Go
You need a way to validate if the player who has the zerg powers is actually the one clicking on his own buildings. You could achieve this by adding the zerg power player to a player variable, lets call the variable "OPzergedplayer". Once you have set the proper player to "OPzergplayer" you can then use an if / then / else statement saying
If - (OPzergdplayer) selects (any) unit owned by (OPzergdplayer)
Then - Show (sub menu button) to (OPzergdplayer) + whatever other actions you do here
Else - whatever other actions you do here
This way only the person who is the zerg player can see the button, and you can change the variable to be another player if you have a round system, i did this off the top of my head so specific wording in the editor may be different.
If you have already done this then we will need more information, such as posting the code that you wrote so people can take a look at it and see if you made any glaring errors, Hope this helps.