So i am working on a check box that, when its checked it selects a unit, and unchecked deselected, but also, when the unit is selected manually it checks the box and vice versa. Here is the script i have, im aware of the bug but im curious if anyone can help me sort this out.
HuD-CheckBoxEventsDialog-AnyDialogItemisusedbyPlayerAnyPlayerwitheventtypeCheckedUnitSelection-AnyUnitisSelectedbyplayerAnyPlayerLocalVariablesConditionsActionsVariable-SetInteger-TempPlayer=(Triggeringplayer)Variable-SetUnit-TempUnit[Integer-TempPlayer] = (Triggering unit)
General - Pick each integer from 1 to 12, and do (Actions)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
Dialog Item - HuD - CheckBox[Integer-TempPlayer][(Pickedinteger)] == (Used dialog item)
Then
General - If (Conditions) then do (Actions) else do (Actions)
If
Boolean - HuD - Selected[Integer-TempPlayer][(Pickedinteger)] == false
Then
Variable - Set Boolean - HuD - Selected[Integer-TempPlayer][(Pickedinteger)] = true
Unit Selection - Select Unit - HuD Selection[Integer-TempPlayer][(Pickedinteger)] for player Integer - Temp Player
Dialog - Set Dialog Item - HuD - CheckBox[Integer-TempPlayer][(Pickedinteger)] to Checked for (Player group(Integer - Temp Player))
Else
Variable - Set Boolean - HuD - Selected[Integer-TempPlayer][(Pickedinteger)] = false
Unit Selection - Deselect Unit - HuD Selection[Integer-TempPlayer][(Pickedinteger)] for player Integer - Temp Player
Dialog - Set Dialog Item - HuD - CheckBox[Integer-TempPlayer][(Pickedinteger)] to Unchecked for (Player group(Integer - Temp Player))
Else
<</code>>\\
<<code>>
HuD - Unit Selected
Events
Unit Selection - Any Unit is Selected by player Any Player
Local Variables
Conditions
Actions
Variable - Set Integer - Temp Player = (Triggering player)
Variable - Set Unit - Temp Unit[Integer-TempPlayer] = (Triggering unit)
General - Pick each integer from 1 to 12, and do (Actions)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
Unit - HuD Selection[Integer-TempPlayer][(Pickedinteger)] == Unit - Temp Unit[Integer-TempPlayer]
Then
Variable - Set Boolean - HuD - Selected[Integer-TempPlayer][(Pickedinteger)] = true
Dialog - Set Dialog Item - HuD - CheckBox[Integer-TempPlayer][(Pickedinteger)] to Checked for (Player group(Integer - Temp Player))
Else
<</code>>\\
<<code>>
HuD - Unit DeSelected
Events
Unit Selection - Any Unit is Deselected by player Any Player
Local Variables
Conditions
Actions
Variable - Set Integer - Temp Player = (Triggering player)
Variable - Set Unit - Temp Unit[Integer-TempPlayer] = (Triggering unit)
General - Pick each integer from 1 to 12, and do (Actions)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
Unit - HuD Selection[Integer-TempPlayer][(Pickedinteger)] == Unit - Temp Unit[Integer-TempPlayer]
Then
Variable - Set Boolean - HuD - Selected[Integer-TempPlayer][(Pickedinteger)] = false
Dialog - Set Dialog Item - HuD - CheckBox[Integer-TempPlayer][(Pickedinteger)] to Unchecked for (Player group(Integer - Temp Player))
Else
So i am working on a check box that, when its checked it selects a unit, and unchecked deselected, but also, when the unit is selected manually it checks the box and vice versa. Here is the script i have, im aware of the bug but im curious if anyone can help me sort this out.
Blarg, that text is very ugly, would you mind posting the map, or some screenies, or something?
@moonwatch89: Go
What is the exact problem?
I don't have the editor at hand, but seeing your post you just ask help me and don't say with what.