This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
I'm searching for a few Galaxy native functions that accomplish certain tasks I need for my scripts:
1. Functions which get the type of unit being produced by a production building or egg and its progress
eg. A Zerg egg is making a roach, and the progress bar shows 15/27 ... looking for two functions to return "Roach" and integer 15 when passed egg.
2. Function which can set the above values for a production building or egg.
eg. Pass a unit - zerg egg - to said function and tell it to make a "Roach" and set progress to integer 15 seconds.
3. Function which can get the list of commands currently given to a Unit
eg. I Shift queued a probe to make a pylon then move to point p...looking for a function to return this info when invoked.
4. Function which can assign a list of commands to a unit
eg. Dynamically give commands to a probe - commands are not known at compile-time but determined at runtime.
Thank you!
1.
TriggerAddEventUnitTrainProgress(trigger t, unitref u, int stage);
unittype UnitTypeFromUnit( unit );
bool UnitCheckProgressState ( unit unit, int slot, preset state );
2.
I'm not sure why you'd need that but
int UnitSetProgressStage(unit u, int slot, int stage);
3.
int UnitOrderCount(unit u); This gives you the amount of commands given
bool UnitOrderIsValid(unit u, order o); You would have to make this a condition for whatever orders you'd need to see
unit OrderGetTargetUnit(order o);
point OrderGetTargetPoint(order o);
4.
bool UnitIssueOrder ( unit u, order ord, preset queue );
order OrderTargetingUnit(abilcmd "Attack", unit u);
order OrderTargetingPoint(abilcmd "Move", point p);
Also I suggest looking all of this up on the wiki for reference.
I'm searching for a few Galaxy native functions that accomplish certain tasks I need for my scripts:
1. Functions which get the type of unit being produced by a production building or egg and its progress
eg. A Zerg egg is making a roach, and the progress bar shows 15/27 ... looking for two functions to return "Roach" and integer 15 when passed egg.
2. Function which can set the above values for a production building or egg.
eg. Pass a unit - zerg egg - to said function and tell it to make a "Roach" and set progress to integer 15 seconds.
3. Function which can get the list of commands currently given to a Unit
eg. I Shift queued a probe to make a pylon then move to point p...looking for a function to return this info when invoked.
4. Function which can assign a list of commands to a unit
eg. Dynamically give commands to a probe - commands are not known at compile-time but determined at runtime.
Thank you!
1.
TriggerAddEventUnitTrainProgress(trigger t, unitref u, int stage);
unittype UnitTypeFromUnit( unit );
bool UnitCheckProgressState ( unit unit, int slot, preset state );
2.
I'm not sure why you'd need that but
int UnitSetProgressStage(unit u, int slot, int stage);
3.
int UnitOrderCount(unit u); This gives you the amount of commands given
bool UnitOrderIsValid(unit u, order o); You would have to make this a condition for whatever orders you'd need to see
unit OrderGetTargetUnit(order o);
point OrderGetTargetPoint(order o);
4.
bool UnitIssueOrder ( unit u, order ord, preset queue );
order OrderTargetingUnit(abilcmd "Attack", unit u);
order OrderTargetingPoint(abilcmd "Move", point p);
Also I suggest looking all of this up on the wiki for reference.