Can I actually get direct access to objects' properties?
For example, I have a trigger which turns on when a unit gets damage.
In this trigger I can get access to the unit by EventUnit() command.
So can I do something like this EventUnit().health to get acces to the health property? Or when i want to assign a value to the units property, can i do it straight through the oop addressing?
However, there's things like Andromeda which is a sort-of interface for Galaxy. If you use it it'll allow syntax like "EventUnit().Health = xx" and transform it into valid Galaxy commands behind-the-scenes.
int UnitGetPropertyInt(unit u, int property, bool currentValue)
fixed UnitGetPropertyFixed(unit u, int property, bool currentValue)
Look for those on the Wiki to see what properties are accessible.
Yeah, thank you, these functions (as well as UnitSet... ones) are almost what I need. "Almost" because I still can't understand how to get access to the properties which ain't in the list of c_unitPropSomething constants. For example, I want to change units' scale runtime, but how to do that?
Can I actually get direct access to objects' properties?
For example, I have a trigger which turns on when a unit gets damage.
In this trigger I can get access to the unit by EventUnit() command.
So can I do something like this EventUnit().health to get acces to the health property? Or when i want to assign a value to the units property, can i do it straight through the oop addressing?
There is no kind of OOP to Galaxy, so no.
However, there's things like Andromeda which is a sort-of interface for Galaxy. If you use it it'll allow syntax like "EventUnit().Health = xx" and transform it into valid Galaxy commands behind-the-scenes.
oh, i got it, thank you
The normal Galaxy functions needed for accessing unit properties are the following:
int UnitGetPropertyInt(unit u, int property, bool currentValue)
fixed UnitGetPropertyFixed(unit u, int property, bool currentValue)
Look for those on the Wiki to see what properties are accessible.
Yeah, thank you, these functions (as well as UnitSet... ones) are almost what I need. "Almost" because I still can't understand how to get access to the properties which ain't in the list of c_unitPropSomething constants. For example, I want to change units' scale runtime, but how to do that?
@Zolden: Go
You mean you want to increase the scale of a unit on the fly? This function exists:
void UnitSetScale (unit inUnit, fixed x, fixed y, fixed z)
it's exactly what I need, thank you