A_ForgetTarget

Moderator: GZDoom Developers

Post Reply
Collegia Titanica
Posts: 83
Joined: Thu Jan 25, 2018 1:37 pm

A_ForgetTarget

Post by Collegia Titanica »

Making sure a target is completely forgotten, as if it's no longer even considered a possible/eligible target.

If target item ---> then A_ClearTarget isn't good enough, doesn't solve the issue, it could still be targeted in the next volley.

Usage:
  • Fire-and-forget Javelin style
  • Splitter Cluster weapon, each split projectile targets one specific enemy, no repetitions.
There is potential for Flag Play here.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: A_ForgetTarget

Post by Graf Zahl »

Collegia Titanica wrote:as if it's no longer even considered a possible/eligible target.
That's the part where things get tricky...
User avatar
Arctangent
Posts: 1235
Joined: Thu Nov 06, 2014 1:53 pm
Contact:

Re: A_ForgetTarget

Post by Arctangent »

I'm not sure what like 80% of this past the first sentence is even trying to get at, but I think the first sentence is enough.

Anyway, this seems to be quite a bit too specific for something engine side, especially since to me it seems like a bunch of different implementations would be desirable depending on the usecase. Not to mention, this is actually the exact opposite of forgetting - this is keeping a special memory of each previous target, so that the actor can use that memory to specifically avoid targeting it again.

I suppose if there's something to be gleamed from this, it'd be being able to shove in a target filter for the built-in target-finding functions so it wouldn't be necessary to write your own once you've dealt with building an array of already targeted actors. It'd certainly be more versatile than this thing, that's for sure.
Collegia Titanica
Posts: 83
Joined: Thu Jan 25, 2018 1:37 pm

Re: A_ForgetTarget

Post by Collegia Titanica »

I thought my message was clear, but you've expanded upon it more. Yes, this would be adding specific target filtering,and from the actors perspective it's "forget about it" hence the name.

1) If for example you have 2-3 targets at longer range, one is closer, the others are further back, friendly actor with decent friendlyseeblocks 50 shoots a homing missile, then after cooldown it shoots another missile. One would hit and destroy the target, while the second will continue flying towards the location of where the target used to be, and home in on some other if it has that screenseeker proximity thing.

If you use the approach of say ... making the missile give the target an item MarkedForDeath and add A_ClearTarget in the firing actor in attempt to make it switch targets by force (After firing,go to script that checks if the enemy has that item, if it does jump to .... etc) , as the 1st missile is flying, it may STILL acquire the same target as legitimate, it's the closest one to it after all, and we don't want more that 1 missile fired upon any target.

2) Second possible case is for cluster projectiles, once they break from whatever projectile actor spawns them, every one of the cluster projectiles could be assigned 1 Target, like some sort of sticky ammunition, 1 enemy = 1 projectile attracted to it, no more, then right click to detonate whenever you want.

Considering the limitations of the game, I thought of something like this and wanted to bring it to attention, along with 2 quickly thought of scenarios for it's use.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: A_ForgetTarget

Post by Graf Zahl »

If you want target filtering you better implement this yourself in the actor's Tick method.
User avatar
Nash
 
 
Posts: 17434
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: A_ForgetTarget

Post by Nash »

Sounds like you can DIY this by keeping an array of "previously targeted victims" and simply do a check against that array.
Collegia Titanica
Posts: 83
Joined: Thu Jan 25, 2018 1:37 pm

Re: A_ForgetTarget

Post by Collegia Titanica »

Can you PM me a working template/prototype of such an array ? I can't delve into coding at all, a simple example would suffice.
User avatar
Rachael
Posts: 13532
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: A_ForgetTarget

Post by Rachael »

Would prefer this not be done via PM, as others besides you may benefit from any simple example posted.
Collegia Titanica
Posts: 83
Joined: Thu Jan 25, 2018 1:37 pm

Re: A_ForgetTarget

Post by Collegia Titanica »

That's fine, if provided, I'll even make a tutorial post with my (future) successful example.Patiently waiting for now
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”