# Training Queue Slot Type Check

Grammarunit training queue slot slot is type|Training Type
FlagsNative | Function

Returns true if a unit in training is training in the specified slot.

# Arguments

Returns — bool

native bool UnitQueueItemTypeCheck(
	unit inUnit,
	int inItem,
	int inType,
);

Category: Unit / Progress And Queues

# Examples

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/sc2tutorial.sc2map/MapScript.galaxy:17572

    UnitGroupLoopBegin(gv_protossGateways);
    for ( ; !UnitGroupLoopDone() ; UnitGroupLoopStep() ) {
        if ((UnitIsSelected(UnitGroupLoopCurrent(), gv_p01_USER) == false) && (UnitQueueItemTypeCheck(UnitGroupLoopCurrent(), 1, c_unitProgressTypeTrain) == false)) {
            UnitGroupAdd(lv_gatewaysWaiting, UnitGroupLoopCurrent());
            gf_CreateTutorialReticleOnUnit(UnitGroupLoopCurrent(), 1.0, libVCMI_ge_CampaginReticleSize_Medium, "Ref_Target 07");

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/sc2tutorial.sc2map/MapScript.galaxy:18416

    UnitGroupLoopBegin(gv_protossGateways);
    for ( ; !UnitGroupLoopDone() ; UnitGroupLoopStep() ) {
        if ((UnitQueueItemTypeCheck(UnitGroupLoopCurrent(), 1, c_unitProgressTypeTrain) == true) && (UnitQueueItemTime(UnitGroupLoopCurrent(), c_unitQueueTimeElapsed, 1) == 0.0)) {
            auto74612559_n = 5;
            for (auto74612559_i = 1; auto74612559_i <= auto74612559_n; auto74612559_i += 1) {

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/sc2tutorial.sc2map/MapScript.galaxy:18622

    UnitGroupLoopBegin(gv_protossGateways);
    for ( ; !UnitGroupLoopDone() ; UnitGroupLoopStep() ) {
        if ((UnitIsSelected(UnitGroupLoopCurrent(), gv_p01_USER) == false) && (UnitQueueItemTypeCheck(UnitGroupLoopCurrent(), 1, c_unitProgressTypeTrain) == false)) {
            UnitGroupAdd(lv_gatewaysWaiting, UnitGroupLoopCurrent());
            gf_CreateTutorialReticleOnUnit(UnitGroupLoopCurrent(), 1.0, libVCMI_ge_CampaginReticleSize_Medium, "Ref_Target 07");

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/sc2tutorial.sc2mapMapScript.galaxy:17572

    UnitGroupLoopBegin(gv_protossGateways);
    for ( ; !UnitGroupLoopDone() ; UnitGroupLoopStep() ) {
        if ((UnitIsSelected(UnitGroupLoopCurrent(), gv_p01_USER) == false) && (UnitQueueItemTypeCheck(UnitGroupLoopCurrent(), 1, c_unitProgressTypeTrain) == false)) {
            UnitGroupAdd(lv_gatewaysWaiting, UnitGroupLoopCurrent());
            gf_CreateTutorialReticleOnUnit(UnitGroupLoopCurrent(), 1.0, libVCMI_ge_CampaginReticleSize_Medium, "Ref_Target 07");

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/sc2tutorial.sc2mapMapScript.galaxy:18416

    UnitGroupLoopBegin(gv_protossGateways);
    for ( ; !UnitGroupLoopDone() ; UnitGroupLoopStep() ) {
        if ((UnitQueueItemTypeCheck(UnitGroupLoopCurrent(), 1, c_unitProgressTypeTrain) == true) && (UnitQueueItemTime(UnitGroupLoopCurrent(), c_unitQueueTimeElapsed, 1) == 0.0)) {
            auto74612559_n = 5;
            for (auto74612559_i = 1; auto74612559_i <= auto74612559_n; auto74612559_i += 1) {

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/sc2tutorial.sc2mapMapScript.galaxy:18622

    UnitGroupLoopBegin(gv_protossGateways);
    for ( ; !UnitGroupLoopDone() ; UnitGroupLoopStep() ) {
        if ((UnitIsSelected(UnitGroupLoopCurrent(), gv_p01_USER) == false) && (UnitQueueItemTypeCheck(UnitGroupLoopCurrent(), 1, c_unitProgressTypeTrain) == false)) {
            UnitGroupAdd(lv_gatewaysWaiting, UnitGroupLoopCurrent());
            gf_CreateTutorialReticleOnUnit(UnitGroupLoopCurrent(), 1.0, libVCMI_ge_CampaginReticleSize_Medium, "Ref_Target 07");