One way to implement this could be a GetThingSpecial function, to accompany the existing SetThingSpecial.
Another possible implementation could be to add APROP_Special and APROP_Arg0 - APROP_Arg4 definitions to the list of ACS actor properties, which could then be used with the existing functions CheckActorProperty, GetActorProperty and SetActorProperty.int GetThingSpecial (int tid, int arg)
Usage
This returns the special or argument of the thing with the specified TID. This does not behave reliably if there is more than one actor with the specified TID, as ZDoom will simply return the arguments from the first actor it finds with that TID.
Parameters
• tid: TID of the actor. Use 0 to refer to the activator.
• arg: Which argument to return. Use 0 to return the special, and 1-5 to return arg0-arg4.
Return value
The requested argument of the actor, as an integer.