+HOSTILE, with A_Look acquiring any possible target
Moderator: GZDoom Developers
+HOSTILE, with A_Look acquiring any possible target
Right now there are two "sides" of monsters: unfriendly, who target the player or whoever hurt them, and friendly, who target unfriendly and don't target friendly.
Sometimes A_Look can be used for things like targeting ANY possible actor, be it player, unfriendly monster or friendly one.
One example (among others) is a proximity detonator. Obviously it's not too realistic for it to know whether it was stepped on by somebody of same "side" of friendliness.
Right now it can be done with flipping FRIENDLY flag two times each tic, with separate calls to A_Look for each "side", which is not a clean solution.
Sometimes A_Look can be used for things like targeting ANY possible actor, be it player, unfriendly monster or friendly one.
One example (among others) is a proximity detonator. Obviously it's not too realistic for it to know whether it was stepped on by somebody of same "side" of friendliness.
Right now it can be done with flipping FRIENDLY flag two times each tic, with separate calls to A_Look for each "side", which is not a clean solution.
- XutaWoo
- Posts: 4005
- Joined: Sat Dec 30, 2006 4:25 pm
- Location: beautiful hills of those who are friends
- Contact:
Re: +HOSTILE, with A_Look acquiring any possible target
This has been deined several times over on the case that this would just take up too memory each look cycle.
That said, I'd still like to see this get in, as it'd be useful when used correctly and in moderation.
That said, I'd still like to see this get in, as it'd be useful when used correctly and in moderation.
Re: +HOSTILE, with A_Look acquiring any possible target
As for resource usage, I believe any workaround still takes more than an internal way of doing things would.
Maybe this could be used not (and not only) as a DECORATE flag for actor, but (also) as a flag to A_LookEx, like LOF_HOSTILE or LOF_TARGETANY.
Maybe this could be used not (and not only) as a DECORATE flag for actor, but (also) as a flag to A_LookEx, like LOF_HOSTILE or LOF_TARGETANY.
- Major Cooke
- Posts: 8215
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: GZBoomer Town
- Contact:
Re: +HOSTILE, with A_Look acquiring any possible target
I would love to have this.
Re: +HOSTILE, with A_Look acquiring any possible target
It would be nice to make a monster hostile to all other living things,
I can already see a workaround like making the monster constantly switch from friendly to unfriendly (Possibly using A_ChangeFlag action rapidly like say alternating by putting A_Changeflag("FRIENDLY",0) then A_Changeflag("FRIENDLY",1) or doing it through acs with the Thing property action),
as well as giving the monster the QUICKTORETALIATE flag to make sure it works.
The flag will make the monster rapidly switch targets though.
I'm not gonna guarantee this exact workaround around will work.
You can fix it all you want to try to make it work if it doesn't.
Its trial and error.
I can already see a workaround like making the monster constantly switch from friendly to unfriendly (Possibly using A_ChangeFlag action rapidly like say alternating by putting A_Changeflag("FRIENDLY",0) then A_Changeflag("FRIENDLY",1) or doing it through acs with the Thing property action),
as well as giving the monster the QUICKTORETALIATE flag to make sure it works.
The flag will make the monster rapidly switch targets though.
I'm not gonna guarantee this exact workaround around will work.
You can fix it all you want to try to make it work if it doesn't.
Its trial and error.
Re: +HOSTILE, with A_Look acquiring any possible target
I have tried it.wtg62 wrote:I can already see a workaround like making the monster constantly switch from friendly to unfriendly (Possibly using A_ChangeFlag action rapidly like say alternating by putting A_Changeflag("FRIENDLY",0) then A_Changeflag("FRIENDLY",1) or doing it through acs with the Thing property action),
as well as giving the monster the QUICKTORETALIATE flag to make sure it works.
The feature suggestion is about an internal way to do this (which would definitely speed up the processing anyway), not about a workaround.Мichаеlis wrote:Right now it can be done with flipping FRIENDLY flag two times each tic, with separate calls to A_Look for each "side", which is not a clean solution.
Re: +HOSTILE, with A_Look acquiring any possible target
I doubt on most people's machines that it would speed things up noticeably. Besides, all the extra checks that it would have to do might slow it down more in the grand scheme of things.Мichаеlis wrote:The feature suggestion is about an internal way to do this (which would definitely speed up the processing anyway), not about a workaround.Мichаеlis wrote:Right now it can be done with flipping FRIENDLY flag two times each tic, with separate calls to A_Look for each "side", which is not a clean solution.
True, it may not be a clean solution, but as long as it works; it works. Might as well.
Re: +HOSTILE, with A_Look acquiring any possible target
So? First off make sure your doing it correctly.Мichаеlis wrote:I have tried it.
Make a script like this:
Code: Select all
Script 1 Open
{
Thing_Property(Tid,APROP_FRIENDLY,1);
Delay(5);
Thing_Property(Tid,APROP_FRIENDLY,0);
Delay(5);
Restart;
}
Who cares if its not about work arounds? Don't we all give our share of help to show the thing asked for is not really needed? If the function gets no'd alot or there's a low chance of it getting in which would you take? The work around or the asking?Michaelis wrote:The feature suggestion is about an internal way to do this (which would definitely speed up the processing anyway), not about a workaround.
Re: +HOSTILE, with A_Look acquiring any possible target
Yes, I haven't clarified, but when I said...wtg62 wrote:So? First off make sure your doing it correctly.
...I meant that I succeeded in it. And a cleaner way is still preferable.Мichаеlis wrote:I have tried it.
Certainly not the solution I already have (which is mentioned in the first post), of course.If the function gets no'd alot or there's a low chance of it getting in which would you take? The work around or the asking?
This, as far as I see, is more relevant to what I am talking about.Sodaholic wrote:I doubt on most people's machines that it would speed things up noticeably. Besides, all the extra checks that it would have to do might slow it down more in the grand scheme of things.