I need a trigger that makes an unit un-deselectable. In other words, you always have that one unit selected. This is very important in my diablo-esque hero arena.
I have tried detecting de-selection and a periodic timer and using the select unit action, but it doesn't seem to work. Can anyone else get this to work or know an alternative method?
This assumes that everything is not selectable by default, you can do this either by triggers or by data (would recommend doing it in data, tick unselectable in CUnit)
Or use event:
Unit Selection - Any Unit is Selected by player (Triggering player)
Unit Selection - Any Unit is clicked by Player (Triggering player)
action:
Unit Selection - select (the unit you want to be always selected) for player (Triggering player)
This assumes that everything is not selectable by default, you can do this either by triggers or by data (would recommend doing it in data, tick unselectable in CUnit)
Quote:
It might not be an option, but you could flag everything else as unselectable. That way your hero can't be deselected.
Make the game disable all selection types from player upon map ini. UI - Enable/Disable Selection Type
then through triggers, select the unit you want selected for the specific player.
Unit Selection - Select Unit
This will make it so you cannot deselect that unit, and there will be no flickering or code running etc. I'm not entirely sure but it MIGHT make it so you cannot target units with abilities, I know you can still target points but I haven't tried with units.
Rollback Post to RevisionRollBack
Zergling Blood : starcraft://map/1/35684
Game of Thrones : starcraft://map/1/189756
Tacticraft : starcraft://map/1/223625
To post a comment, please login or register a new account.
I need a trigger that makes an unit un-deselectable. In other words, you always have that one unit selected. This is very important in my diablo-esque hero arena.
I have tried detecting de-selection and a periodic timer and using the select unit action, but it doesn't seem to work. Can anyone else get this to work or know an alternative method?
Thanks, -SD
Using a periodic event will cause flickering every second frame, so don't do that. Only select when you need to, i.e unit birth/revive.
This assumes that everything is not selectable by default, you can do this either by triggers or by data (would recommend doing it in data, tick unselectable in CUnit)
Or use event:
Unit Selection - Any Unit is Selected by player (Triggering player)
Unit Selection - Any Unit is clicked by Player (Triggering player)
action:
Unit Selection - select (the unit you want to be always selected) for player (Triggering player)
Will cause flickering, like i said.
It might not be an option, but you could flag everything else as unselectable. That way your hero can't be deselected.
What Nexius has suggested works, I use it in my RPG. It's not as much work as it might sound like.
@JakeCake26: Go
This may be a necro but I have new information.
Make the game disable all selection types from player upon map ini. UI - Enable/Disable Selection Type
then through triggers, select the unit you want selected for the specific player.
Unit Selection - Select Unit
This will make it so you cannot deselect that unit, and there will be no flickering or code running etc. I'm not entirely sure but it MIGHT make it so you cannot target units with abilities, I know you can still target points but I haven't tried with units.