City17
4 years
Types [jassdoc]unit[/jassdoc], [jassdoc]destructable[/jassdoc], [jassdoc]item[/jassdoc] extend from widget. All API functions that accept widget, will also take any of the children types. However if doesn't work the other way around, then you need to explicitly cast the type by pushing it through a hashtable, "downcasting": Put the widget object in a hashtable and retrieve it as unit/destructable/item - needed since 1.24b, source: The Helper Wiki.