Hello, I have started trying to use SGroups as a means to read input from the keyboard
function Punisher_Init() ind = Tut_GetLocalPlayerIndex() client = World_GetPlayerAt(ind) SGroup_Create("1") SGroup_Create("2") SGroup_Create("3") SGroup_Create("4") W40k_AssignHotkeySGroup( "1", 0 ) W40k_AssignHotkeySGroup( "2", 9 ) W40k_AssignHotkeySGroup( "3", 8 ) W40k_AssignHotkeySGroup( "4", 7 ) Rule_Add(Rule_Monitor1) print("successfully initialized") end function Rule_Monitor1() if SGroup_IsSelected("1") then print("pressed 0") end end
When I press 0 the game selects an empty squad but when I check the logs nothing printed, what am I doing wrong?