How to set AAPTR via actor pointer?

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
User avatar
Silentdarkness12
Posts: 1555
Joined: Thu Aug 15, 2013 5:34 pm
Location: Plains of Pride

How to set AAPTR via actor pointer?

Post by Silentdarkness12 »

I'm continuing to work on another project, but i'm a bit vexed because I need to access an AAPTR, particularly target, in a nonstandard manner. What i'm trying to figure out is, is there a way to set an AAPTR pointer via a normal actor pointer?
Gez
 
 
Posts: 17939
Joined: Fri Jul 06, 2007 3:22 pm

Re: How to set AAPTR via actor pointer?

Post by Gez »

I don't think so, the AAPTR are, strictly speaking, indices to pointers rather than actual pointers. E.g. AAPTR_TARGET says "use the pointer from the target field", it's not itself the target pointer. It's just a numerical constant after all. So there's no way to "convert" a real pointer into an AAPTR constant. Best you can possibly imagine to do is compare them, see if the mobj pointed by the target field is the same mobj as the one from your pointer.
Post Reply

Return to “Scripting”