Page 1 of 1

Thing_ProjectileIntercept and AAPTR_TARGET:

Posted: Sun Mar 11, 2018 2:39 am
by Ravick
Hi there,


So, I'm making a monster that spawns a secondary actor transfering its own pointers to this actor, and then such actor calls Thing_ProjectileIntercept. As the intention was to make the actor aim at the monster's current target, my 'intuitive' first try was:

Code: Select all

TNT1 A 1 Thing_ProjectileIntercept (0,1544,240,AAPTR_TARGET,0)
The '1544' is the spawnid of the projectile, of course.
However, because projectiles use "target" pointer to get the monster tat shoots then, it tried to hit the monster itself. I took a look here but I could not get if actually there is way to expose the monster's target to Thing_ProjectileIntercept.

If I manage to arbitrary change player's TID to a number, and set this number to the code line, it works just fine. However, the map must have coop support with different TIDs. It also must be "Zscript-free" because of Zandronum compatibility, and... requirements of the dev team.


Is there a way to get it DECORATE side? I'm guessing I could use ACS and ACS ExecuteWithResult to get it, but I'd preffer to keep it DECORATE only, if possible.

Thanks in advance! :)

Re: Thing_ProjectileIntercept and AAPTR_TARGET:

Posted: Mon Mar 12, 2018 11:45 am
by krokots
Use "tracer" for storing the actor that is the current monster target. Transfer "target" pointer from monster, to "tracer" pointer in projectile. Then use AAPTR_TRACER instead AAPTR_TARGET.

Re: Thing_ProjectileIntercept and AAPTR_TARGET:

Posted: Mon Mar 19, 2018 9:01 pm
by Ravick
Oh, I thought that only seeker missiles use it. Thanks, Krokots! :o