Update:
function Punisher_Init() ind = Tut_GetLocalPlayerIndex() client = World_GetPlayerAt(ind) build = Player_GetEntities(client) PID = Player_GetID(client) hq = EGroup_GetSpawnedEntityAt(string.format("__Player%dEntities", PID),1) spawn = Entity_GetPosition(hq) child = Squad_Create("guard_squad_civilian_child_a", client, spawn, 0) one = SGroup_Create("1") two = SGroup_Create("2") three = SGroup_Create("3") four = SGroup_Create("4") SGroup_Add(one, child) 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() Misc_GetSelectedSquads(SGroup_CreateIfNotFound("sg_Player1selection")) t_builder1 = Util_MakeBlueprintTable( "guard_squad_civilian_child_a" ) if SGroup_ContainsBlueprints("sg_Player1selection", t_builder1, false) == true then print("pressed 0") end end
I switched to this, SGroup_IsSelected didn't seem to work, but this configuration isn't working either, I think its becuase the squad I spawn in doesn't actually show up but I'm trying to find out why