+HOSTILE, with A_Look acquiring any possible target

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: +HOSTILE, with A_Look acquiring any possible target

Re: +HOSTILE, with A_Look acquiring any possible target

by Мichаеlis » Thu Sep 01, 2011 9:19 am

wtg62 wrote:So? First off make sure your doing it correctly.
Yes, I haven't clarified, but when I said...
Мichаеlis wrote:I have tried it.
...I meant that I succeeded in it. And a cleaner way is still preferable.
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?
Certainly not the solution I already have (which is mentioned in the first post), of course.
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.
This, as far as I see, is more relevant to what I am talking about.

Re: +HOSTILE, with A_Look acquiring any possible target

by HeXaGoN » Wed Aug 31, 2011 9:10 pm

Мichаеlis wrote:I have tried it.
So? First off make sure your doing it correctly.
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;
}
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.
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?

Re: +HOSTILE, with A_Look acquiring any possible target

by Sodaholic » Tue Aug 30, 2011 12:13 am

Мichаеlis wrote:
М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.
The feature suggestion is about an internal way to do this (which would definitely speed up the processing anyway), not about a workaround.
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.

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

by Мichаеlis » Mon Aug 29, 2011 11:55 pm

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.
I have tried it.
М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.
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

by HeXaGoN » Mon Aug 29, 2011 5:47 pm

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.

Re: +HOSTILE, with A_Look acquiring any possible target

by Major Cooke » Fri Jul 29, 2011 9:46 am

I would love to have this.

Re: +HOSTILE, with A_Look acquiring any possible target

by Мichаеlis » Fri Jul 29, 2011 1:04 am

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.

Re: +HOSTILE, with A_Look acquiring any possible target

by XutaWoo » Fri Jul 29, 2011 12:16 am

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.

+HOSTILE, with A_Look acquiring any possible target

by Мichаеlis » Thu Jul 28, 2011 11:51 pm

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.

Top