# Training Queue Slot Type Check
Grammar — unit training queue slot slot is type|Training Type
Flags —Native
|Function
Returns true if a unit in training is training in the specified slot.
# Arguments
unit
— Unitint
— Slotint
<preset::TrainingQueueSlotType> — Type
Returns — bool
native bool UnitQueueItemTypeCheck(
unit inUnit,
int inItem,
int inType,
);
# Related
Category: Unit / Progress And Queues
- Set Unit Progress —
void
— UnitSetProgressComplete - Unit Progress (Percent) —
fixed
— UnitGetProgressComplete - Pause/Resume/Cancel Unit Progress Bar —
void
— UnitSetProgressStage - Unit Progress Bar Check —
bool
— UnitCheckProgressState - Unit Is Under Construction —
bool
— libNtve_gf_UnitIsUnderConstruction - Unit Arming Progress —
void
— TriggerAddEventUnitArmMagazineProgress - Unit Construction Progress —
void
— TriggerAddEventUnitConstructProgress - Unit Learn Progress —
void
— TriggerAddEventUnitLearnProgress - Unit Research Progress —
void
— TriggerAddEventUnitResearchProgress - Unit Revive Progress —
void
— TriggerAddEventUnitReviveProgress - Unit Specialization Progress —
void
— TriggerAddEventUnitSpecializeProgress - Unit Training Progress —
void
— TriggerAddEventUnitTrainProgress - Triggering Progress Object —
string
<gamelink> — EventUnitProgressObjectType - Triggering Progress Ability —
string
<gamelink::Abil> — libNtve_gf_TriggeringProgressAbility - Triggering Progress Effect —
string
<gamelink::Effect> — libNtve_gf_TriggeringProgressEffect - Triggering Progress Unit —
unit
— EventUnitProgressUnit - Triggering Progress Unit Type —
string
<gamelink::Unit> — libNtve_gf_TriggeringProgressUnitType - Triggering Progress Upgrade —
string
<gamelink::Upgrade> — libNtve_gf_TriggeringProgressUpgrade - Number Of Items In Training Queue Slot —
int
— UnitQueueItemCount - Queued Object In Training Queue Slot —
string
<gamelink> — UnitQueueItemGet - Queued Behavior Type In Training Queue Slot —
string
<gamelink::Behavior> — libNtve_gf_QueuedBehaviorTypeInTrainingQueueSlot - Queued Unit Type In Training Queue Slot —
string
<gamelink::Unit> — libNtve_gf_QueuedUnitTypeInTrainingQueueSlot - Queued Upgrade Type In Training Queue Slot —
string
<gamelink::Upgrade> — libNtve_gf_QueuedUpgradeTypeInTrainingQueueSlot - Training Queue Property Of Unit —
int
— UnitQueueGetProperty - Training Queue Slot Type Check —
bool
— UnitQueueItemTypeCheck - Training Queue Time —
fixed
— UnitQueueItemTime
# Examples
campaigns/void.sc2campaign — base.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.sc2campaign — base.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.sc2campaign — base.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.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.sc2campaign/base.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.sc2campaign/base.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");