1.16.1 · Index · Add Address · Statistics · Reference · About

 ?  Address 0x0059CD70
 ?  Player ID 19075 (Byte Offset: 00)
 ?  Version 1.16.1
 ?  Name CUnit - Carrier/Reaver - In Hangar Count
 ?  Size 1
 ?  Length 1
 ?  SC:Remaster Supported
 ?  Description Amount of units in hangar. Also: Scarab/Interceptor - pointer to next scarab/interceptor Beacon - Flag spawn frame Building - Tech type/upgrade type/larva timer/landing timer Worker - Target resource CUnit pointer ```eps // example: unlimit interceptor count from 8 to 20 // ONLY for P1 gantrithors const P1gantrithors = UnitGroup(12); const nonP1gantrithors = UnitGroup(12 * 7); foreach(ptr, epd : EUDLoopNewUnit()) { epdswitch (epd + 25) { case $U("Gantrithor"): epdswitch (epd + 19, 255) { case $P1: P1gantrithors.add(epd); break; default: nonP1gantrithors.add(epd); } break; } } foreach(gantrithor : P1gantrithors.cploop) { foreach(dead : gantrithor.dying) { } var trainCount = 0; // how many interceptors are being trained gantrithor.move_cp(0x98/4); // buildQueue[[0, 1]] // [73] Interceptor Trigger(DeathsX(CurrentPlayer, Exactly, 73, 0, 0xFFFF), trainCount.AddNumber(1)); Trigger(DeathsX(CurrentPlayer, Exactly, 73 << 16, 0, 0xFFFF0000), trainCount.AddNumber(1)); gantrithor.move_cp(0x9C/4); // buildQueue[[2, 3]] Trigger(DeathsX(CurrentPlayer, Exactly, 73, 0, 0xFFFF), trainCount.AddNumber(1)); Trigger(DeathsX(CurrentPlayer, Exactly, 73 << 16, 0, 0xFFFF0000), trainCount.AddNumber(1)); gantrithor.move_cp(0xA0/4); // buildQueue[4] Trigger(DeathsX(CurrentPlayer, Exactly, 73, 0, 0xFFFF), trainCount.AddNumber(1)); gantrithor.move_cp(0xC8/4); const inCount = bread_cp(0, 0); // 0xC8: inHangerCount const outCount = bread_cp(0, 1); // 0xC9: outHangerCount gantrithor.move_cp(0x94/4); // currentButtonset if (trainCount + inCount + outCount >= 20) { // compare sum wwrite_cp(0, 0, $U("Protoss Carrier")); } else { wwrite_cp(0, 0, $U("Gantrithor")); } } foreach(gantrithor : nonP1gantrithors.cploop) { foreach(dead : gantrithor.dying) { } gantrithor.move_cp(0x94/4); // currentButtonset wwrite_cp(0, 0, $U("Protoss Carrier")); } ```
Edit
Links: full · short · direct