Not sure if this should be in triggers or galaxy code.
I need to hide the unit's owner when you hover over the unit...
I thought about trying to do this directly by somehow disabling a setting.
OR
Creating several units for a neutral player, player 0, and then allowing the other players to control it...neutral players don't show up when you hover on the units.
However I can't figure out how to do this either way...
Yes, there is a way to do this. You have to use triggers to set some unit flag to not show the owner. I'll check it out (I just used this for one of my own maps) and let you know in a minute.
edit- aha! Just make a trigger and and put in the action 'set unit state'. Set the tooltip state to off. You have to do this to each unit.
Yea I figured that might have been the problem, but I set the immovable option AFTER the tooltip setting and that one worked...I'll try the variable thing and post back
Thats really strange. It worked for me... How odd. (attached example)
Of course, this was tested offline. It might be different on battle net. But there is a way to do it on battle net, I've seen other people do it before...
Yea tried it on battle.net didn't work...then tried it offline.
Offline when there are no players playing Player 2, it just make the units neutral (therefore no tooltips)
On b.net, I put a computer into the spot for player 2 and I get an ownership tag of Player 2
edit: also tried my other method...
I had 2 neutral teams with marines and set the alliance of the neutral teams to allied and controlable to Player 1.
This way when you hover over the unit, the neutral player owns it therefore revealing no owner.
However I'm trying to make a 12 person map, so I'd need 12 neutral players to match the real players...and there's only 16 player spots...DAMN
And I don't think you can grant control for individual units, just entire teams
There's some trigger action that lets you enable/disable shared control for a unit. I have only used it to try to disable control for a single unit when the player had shared control of all units. That did not work. Perhaps the other way around works.
There isn't really anything inherently wrong with using "Last Created" as far as I am aware. Setting a unit to a variable before modifying it is only necessary if you're going to be accessing the unit outside of the scope of that trigger. "Last Created" ignores all other triggers, so there's no danger of modifying the wrong unit unless your logic inside the trigger is broken.
There are a lot of situations where you might be creating a unit and just want to set some information for it before sending it out on its merry way, with no intention of ever touching it again. Whether it's an attack wave, or a temporary unit actor for a cut-scene, etc. Creating a variable for these types of units if you have no intention of accessing them again is actually creating clutter that you don't need.
On the topic of the question at hand, despite the fact that it was answered, I'm still curious why the OP's original method didn't work. I'm using
Unit - Turn (Last created unit) Status Bar state Off
Unit - Turn (Last created unit) Tooltips state Off
Unit - Turn (Last created unit) Targetable state Off
Unit - Turn (Last created unit) Selectable state Off
Unit - Turn (Last created unit) Invulnerable state On
to set units I create to be actors in a looping backdrop scene that I play behind my campaign menu, and it works perfectly. Interesting that you can set this state for a player overall though, very helpful info nugget!
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Not sure if this should be in triggers or galaxy code. I need to hide the unit's owner when you hover over the unit...
I thought about trying to do this directly by somehow disabling a setting.
OR
Creating several units for a neutral player, player 0, and then allowing the other players to control it...neutral players don't show up when you hover on the units.
However I can't figure out how to do this either way...
Welcome to SC2mapster! :)
Tough one you have their. There definitely arn't any unit flags that do that.
Welcome to sc2mapster :D
Yes, there is a way to do this. You have to use triggers to set some unit flag to not show the owner. I'll check it out (I just used this for one of my own maps) and let you know in a minute.
edit- aha! Just make a trigger and and put in the action 'set unit state'. Set the tooltip state to off. You have to do this to each unit.
@zeldarules28: Go
Tried this...didn't work for some reason...
http://i37.photobucket.com/albums/e83/huperphuff/triggers-1.jpg http://i37.photobucket.com/albums/e83/huperphuff/drones.jpg
As you can see I also made the units immoveable which stuck...so for some reason the tooltip setting isn't affecting the units
@huperphuff: Go
ONLY use "Last created" functions once- for setting a variable.
That may or may not be your problem, but don't use the last created unit function like that, set a variable and use it.
@grenegg: Go
Yea I figured that might have been the problem, but I set the immovable option AFTER the tooltip setting and that one worked...I'll try the variable thing and post back
edit: yea it didn't work...same result
Thats really strange. It worked for me... How odd. (attached example)
Of course, this was tested offline. It might be different on battle net. But there is a way to do it on battle net, I've seen other people do it before...
@zeldarules28: Go
Yea tried it on battle.net didn't work...then tried it offline. Offline when there are no players playing Player 2, it just make the units neutral (therefore no tooltips)
On b.net, I put a computer into the spot for player 2 and I get an ownership tag of Player 2
edit: also tried my other method... I had 2 neutral teams with marines and set the alliance of the neutral teams to allied and controlable to Player 1.
This way when you hover over the unit, the neutral player owns it therefore revealing no owner.
However I'm trying to make a 12 person map, so I'd need 12 neutral players to match the real players...and there's only 16 player spots...DAMN
And I don't think you can grant control for individual units, just entire teams
There's some trigger action that lets you enable/disable shared control for a unit. I have only used it to try to disable control for a single unit when the player had shared control of all units. That did not work. Perhaps the other way around works.
@Nashadun: Go
Couldn't find it? Category? Any help greatly appreciated :D
There's a much easier way to remove the highlight names.
@BasharTeg: Go
OMG I think it worked...thank you very much sir!
WOW.
Guess I was leading you down the wrong path O.o Sorry lol. :)
My pleasure :). Welcome to Sc2mapster.
@grenegg: Go
There isn't really anything inherently wrong with using "Last Created" as far as I am aware. Setting a unit to a variable before modifying it is only necessary if you're going to be accessing the unit outside of the scope of that trigger. "Last Created" ignores all other triggers, so there's no danger of modifying the wrong unit unless your logic inside the trigger is broken.
There are a lot of situations where you might be creating a unit and just want to set some information for it before sending it out on its merry way, with no intention of ever touching it again. Whether it's an attack wave, or a temporary unit actor for a cut-scene, etc. Creating a variable for these types of units if you have no intention of accessing them again is actually creating clutter that you don't need.
On the topic of the question at hand, despite the fact that it was answered, I'm still curious why the OP's original method didn't work. I'm using
Unit - Turn (Last created unit) Status Bar state Off Unit - Turn (Last created unit) Tooltips state Off Unit - Turn (Last created unit) Targetable state Off Unit - Turn (Last created unit) Selectable state Off Unit - Turn (Last created unit) Invulnerable state On
to set units I create to be actors in a looping backdrop scene that I play behind my campaign menu, and it works perfectly. Interesting that you can set this state for a player overall though, very helpful info nugget!