Hey Guys,
I found out that the "handle" type is the parent type of the variables you define in the Trigger Editor GUI.
JASS Manual: Types
It is also some kind of "pointer".
So I thought nice gonna use it like in C++ then:
Defined a variable with type ability (derived from: <-agent<-handle) and call
<udg_ability_variable>.levels or <udg_ability_variable>->levels
(max level property name in editor on CTRL + D)
But both do not work. So how can I get the properties of such "struct like" objects? Or are they all private?
If this functionality is not there yet it would be so awesome to have a generic function to search on such kind of handle object if the property exsist and return the value if it does.
something like:
where "expectedTypeT" can be a basic type: integer, string, raw and so on...
I found out that the "handle" type is the parent type of the variables you define in the Trigger Editor GUI.
JASS Manual: Types
It is also some kind of "pointer".
So I thought nice gonna use it like in C++ then:
Defined a variable with type ability (derived from: <-agent<-handle) and call
<udg_ability_variable>.levels or <udg_ability_variable>->levels
(max level property name in editor on CTRL + D)
But both do not work. So how can I get the properties of such "struct like" objects? Or are they all private?
If this functionality is not there yet it would be so awesome to have a generic function to search on such kind of handle object if the property exsist and return the value if it does.
something like:
Code:
getPropertyOfObject(handle type, string o, string expectedTypeT) returns expectedTypeT
found type.o
if expectedTypeT == type.o.type
return type.o.value
else
return type.null
else return type.null
where "expectedTypeT" can be a basic type: integer, string, raw and so on...