• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Order Tracking - Submission

Status
Not open for further replies.

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,182
JASS:
//! zinc
    library OrderDetection {
 
        function onOrder() {
            integer order = GetIssuedOrderId();
            debug BJDebugMsg(GetUnitName(GetTriggerUnit()) + "'s current order id is: " + I2S(order) + " " + OrderId2String(order));
        }
 
        function onInit() {
            trigger t = CreateTrigger();
            TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER);
            TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER);
            TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_ISSUED_ORDER);
            TriggerAddAction(t, function onOrder);
            t = null;
        }
    }
//! endzinc
 

Attachments

  • 1 Order Tracking.w3m
    16.2 KB · Views: 41
Last edited:
Level 22
Joined
Feb 6, 2014
Messages
2,466
Sorry for the thread derail, I just think it's pointless to do this stuffs (you already know) just for the award. Participating in contest is better if you ask me. The award there is a better ego booster. But for other people familiarizing with JASS, it's the complete opposite. These missions will help them a lot.

But how will the award work? What if a new mission is added?
 

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,182
Considering me low score at the last spell contest I hope to pick up a thing or two, and as I said I have not worked with wc3 for a while so it is good practice to refresh memory.
Though I do agree that it is pointless to some extent if you already know stuff.
But how will the award work? What if a new mission is added?
Thought of this myself, no clue.
Maybe it will be like complete 10 missions, does not matter which ones.

Participating in contest is better if you ask me
But then you actually have to be good :D
 

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,182
I placed a barracks and trained a few footmen, it worked.

0e8f9e8a2a4c2b37af565e8c1a939c26.png


Apparently it cannot convert to string but the id and name gets displayed

edit: oh wait you want me to build it literary

edit2: this is what happens
e8e920523f350c51a5efeb5b72b7fcff.png


Repair is when the pesant is actually building and the other one is while walking there


JASS:
//! zinc
    library OrderDetection {

        function onOrder() {
            integer order = GetIssuedOrderId();
            string x = GetObjectName(order);
           
            if(x=="Default string") {
                x = GetUnitName(GetTriggerUnit()) + "'s current order id is: " + I2S(order) + " " + OrderId2String(order);
            } else {
                x = GetUnitName(GetTriggerUnit()) + "'s current order id is: " + I2S(order) + " " + x;
            }
           
            BJDebugMsg(x);
        }

        function onInit() {
            trigger t = CreateTrigger();
            TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER);
            TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER);
            TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_ISSUED_ORDER);
            TriggerAddAction(t, function onOrder);
            t = null;
        }
    }
//! endzinc
 

Attachments

  • Unit Order.w3x
    17 KB · Views: 58
Last edited:
Status
Not open for further replies.
Top