Page 3 of 3

Re: Set victim as tracer?

Posted: Sun May 04, 2014 12:51 pm
by Ghastly
In the meantime, how does TracerOnHit itself sound? Considering the projectile has already hit something, I don't think we would necessarily care about our original tracer in that case.

Re: Set victim as tracer?

Posted: Sun May 04, 2014 3:58 pm
by XutaWoo
Ghastly_dragon wrote:In the meantime, how does TracerOnHit itself sound? Considering the projectile has already hit something, I don't think we would necessarily care about our original tracer in that case.
There are the scenarios where you want to check if the projectile hit its intended target or not.

Just for reference, if that wants to be put up for consideration.

Re: Set victim as tracer?

Posted: Wed May 07, 2014 9:46 pm
by Major Cooke
Graf Zahl wrote:...and NO WRITE ACCESS from DECORATE at all!
"Write" access? You mean things like A_RearrangePointers and the likes?
XutaWoo wrote:There are the scenarios where you want to check if the projectile hit its intended target or not.

Just for reference, if that wants to be put up for consideration.
I can foresee ripper missiles being one of them. But I could imagine a special projectile seeking after its tracer, and having the ability to immediately change to ripping another monster it touches in its place.

Re: Set victim as tracer?

Posted: Mon May 12, 2014 1:16 pm
by Ghastly
Okay, yeah, I can see that.

The "NO write access from Decorate" made me a little nervous, but as long as it would be useful in all the same functions such as A_GiveToTarget, A_Warp and etc., then I don't see a problem. After this, we would need A_JumpIfNullPointer, though. :P

Re: Set victim as tracer?

Posted: Tue May 13, 2014 9:51 am
by phantombeta
Ghastly_dragon wrote:After this, we would need A_JumpIfNullPointer, though.
Like this?

Re: Set victim as tracer?

Posted: Tue May 13, 2014 9:57 am
by Gez
No, like this:

Code: Select all

A_JumpIf(AAPTR_VICTIM == AAPTR_NULL, "state")

Re: Set victim as tracer?

Posted: Tue May 13, 2014 10:42 am
by NeuralStunner
It would still need a dedicated action function, since "pointer selectors" are just arbitrary bitfield values (classy!) and nothing like actual pointers. :?

Working with actual (or "virtual") actor pointers would be one of the best features for ZScript.

Re: Set victim as tracer?

Posted: Tue May 13, 2014 10:46 am
by Graf Zahl
A real scripting language can do that easily. DECORATE, on the other hand is ill equipped for that.

Re: Set victim as tracer?

Posted: Fri Jul 25, 2014 6:35 pm
by Ghastly
I just dug through the source, and apparently the only way a projectile can use the lastenemy pointer is with the native and not-very-customizable MWeapLightning functions. Everything else is monster behavior. The only other existing pointer I can think to use is maybe goal, if we don't make a new pointer.

Ryan_Cordell posted a patch preview on the first page for a flag that worked in testing. Some of the work is done already (though for the p_railattack one, I'd've put it in the if(spawnpuff) part at about line 4062). Ripping projectiles are an interesting subject, though, as is the ability to check if the pointer in question is the same actor as the projectile's tracer, as was brought up earlier.

Re: Set victim as tracer?

Posted: Wed Dec 03, 2014 3:05 pm
by Major Cooke
Request made. But all it is, is just three flags. Better than nothing at least.