[Added] [ZScript] RoughMonsterSearch for all actors

Moderator: GZDoom Developers

[ZScript] RoughMonsterSearch for all actors

Postby krokots » Sun May 07, 2017 9:19 am

As MajorCooke wrote in this post
viewtopic.php?p=995586#p995586
this function does work only for summoned monsters and seeker missiles. Is there a reason for this? I'd like to use it for monster AI.
User avatar
krokots
 
Joined: 19 Jan 2010

Re: [ZScript] RoughMonsterSearch for all actors

Postby nazakomu » Mon May 08, 2017 8:45 pm

krokots wrote:I'd like to use it for monster AI.


I can totally support this, as I believe there should be a thorough amount of monster AI functions implemented; I myself am working on things much related towards that categorically and it'd be very appreciative and advantageous to have more of these types of things to utilize at oneself's will.

With that all being said—to make sure feature suggestions are feasible and plausible for implementation—we have to make sure that these features requested are actually going to be exceedingly useful and unique because you can formulate a vast amount of workarounds with DECORATE's features initially in most cases and I'm certain Graf wouldn't want to occupy any of his time towards anything that could already be achieved. :D
Last edited by nazakomu on Sun May 28, 2017 2:10 pm, edited 1 time in total.
User avatar
nazakomu
apathetic
 
Joined: 30 Nov 2016
Discord: Nazakomu#2197
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: [ZScript] RoughMonsterSearch for all actors

Postby AFADoomer » Mon May 08, 2017 9:21 pm

Does LookForEnemies not do what you want?

Code: Select allExpand view
    LookExParams SearchParams;

    SearchParams.fov = 100;
    SearchParams.minDist = 0;
    SearchParams.maxDist = 1024;
    SearchParams.maxHearDist = 1024;

    LookForEnemies(false, SearchParams); // First argument is "look all around?"
User avatar
AFADoomer
 
Joined: 15 Jul 2003

Re: [ZScript] RoughMonsterSearch for all actors

Postby Graf Zahl » Tue May 09, 2017 1:51 am

Oh the joys of poorly planned ancient code... :? But for the general case LookForEnemies may indeed be better. Internally it's using the same logic for searching but performs different checks on the potential targets, which are more fitting for regular monsters.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: [ZScript] RoughMonsterSearch for all actors

Postby InsanityBringer » Tue May 09, 2017 10:12 am

hmm, if they're similar, would it be possible to let RoughMonsterSearch use some of the search params for LookForEnemies and the like? Reason I ask is that I'm toying around with descent style seeker missiles, however this requires constraining the FOV, and RoughMonsterSearch doesn't seem to support this (you can only set it to look ahead, but not with a specific FOV), and LookForEnemies seems to exclusively set the target pointer and nothing else. I did have a hacky solution for this in the past, but it involved just not seeking if the target is out of sight and searching again, but this would frequently cause problems since it would keep on finding the same out of sight monster.
User avatar
InsanityBringer
 
Joined: 05 Jul 2007
Location: opening the forbidden box
Discord: InsanityBringer#9908

Re: [ZScript] RoughMonsterSearch for all actors

Postby Graf Zahl » Tue May 09, 2017 10:35 am

I'll have to take a look and compare both but I had the same thought. They are a bit redundant.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany


Return to Closed Feature Suggestions

Who is online

Users browsing this forum: No registered users and 0 guests