Retrieve an actor's arguments via ACS

Moderator: GZDoom Developers

Post Reply
User avatar
GFD
Posts: 347
Joined: Mon May 31, 2010 7:42 pm
Preferred Pronouns: He/Him
Location: Canada
Contact:

Retrieve an actor's arguments via ACS

Post by GFD »

I'd love to be able to access an actor's arguments via ACS, which I don't believe is possible currently. In my case, I'd like to be able to use mapspots with unique arguments to easily change how a scripted platform moves between mapspots.

One way to implement this could be a GetThingSpecial function, to accompany the existing SetThingSpecial.
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.
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.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”