[SOLVED] Actor completely stops targeting

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)

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: [SOLVED] Actor completely stops targeting

Re: Actor completely stops targeting

by TDRR » Fri May 24, 2019 12:19 am

Dan_The_Noob wrote:
TDRR wrote:
TXTX wrote:Do you use A_Chase after it stops targeting? That usually handles all targeting procedures for monsters. Hexen firedemons had a similar problem with a mod of my own. If anything you could have it call A_Cleartarget which will also clear up its currrent target, past target, and heard target. Might give you a place to look at least.
Oh wow, it works! Thanks a lot mate, i can finally continue these bots the proper way!
so... it WAS token/list related?
Actually, the bug seems to be ZDoom specific, and after testing it in Zandro (which i did above) the problem dissapeared. That's unacceptable, so i just cherry-picked the best parts for the TDBots instead of rewriting it using the DecoBot AI.

Re: Actor completely stops targeting

by Dan_The_Noob » Thu May 23, 2019 10:15 pm

TDRR wrote:
TXTX wrote:Do you use A_Chase after it stops targeting? That usually handles all targeting procedures for monsters. Hexen firedemons had a similar problem with a mod of my own. If anything you could have it call A_Cleartarget which will also clear up its currrent target, past target, and heard target. Might give you a place to look at least.
Oh wow, it works! Thanks a lot mate, i can finally continue these bots the proper way!
so... it WAS token/list related?

Re: Actor completely stops targeting

by TDRR » Thu May 23, 2019 4:22 pm

TXTX wrote:Do you use A_Chase after it stops targeting? That usually handles all targeting procedures for monsters. Hexen firedemons had a similar problem with a mod of my own. If anything you could have it call A_Cleartarget which will also clear up its currrent target, past target, and heard target. Might give you a place to look at least.
Oh wow, it works! Thanks a lot mate, i can finally continue these bots the proper way!

Re: Actor completely stops targeting

by TXTX » Thu May 23, 2019 12:50 pm

Do you use A_Chase after it stops targeting? That usually handles all targeting procedures for monsters. Hexen firedemons had a similar problem with a mod of my own. If anything you could have it call A_Cleartarget which will also clear up its currrent target, past target, and heard target. Might give you a place to look at least.

Re: Actor completely stops targeting

by TDRR » Tue May 21, 2019 11:39 pm

Dan_The_Noob wrote: I had a bit of a look at it yesterday... my best guess is it's out of ammo and not checking?
if it operates like a player its guns would need ammo checks, i guess?
Nope, the bot is not aware of how much ammo it has. It does, however, switch to the next best weapon with ammo, which if it happens to be the fist (or some other melee weapon), then it rushes forward to it's target and furiously punches it.

The thing is, it doesn't even target anything at all after killing the first couple targets. Doesn't face them, doesn't attempt to attack and isn't even aware of their existence. I'm stumped as to why this is.

Re: Actor completely stops targeting

by Dan_The_Noob » Tue May 21, 2019 9:49 pm

TDRR wrote:
Dan_The_Noob wrote:what does the "YeahSeen" token do exactly? it's hard to follow

--edit--
I'm just trying to follow a line from spawn to attack... does the bot have infinite ammo or something?
Also, i couldn't get bots to spawn period so have no ingame reference.
Sorry, was in a hurry yesterday so couldn't post the full instructions.

Here's some more detail: YeahSeen is a token used for basically anything but i named it like that because it originally was for checking line of sight with the target, you will see it always immediately after some codepointer, because it's an item given by those codepointers to indicate a successful script execution/jump to another "state".

You need a bot config to spawn the bots, for instance the one posted here: viewtopic.php?f=43&t=64527
Alternatively, just loading the bots in Zandronum removes the need for any bot config.
The bot's ammo is dictated by the real weapon it's carrying, internally they work like real players, not monsters, their targeting system is still almost entirely monster-like though. Which is why you can spectate them with F12 and see them actually firing their weapon exactly like a real player, animation and everything.
I had a bit of a look at it yesterday... my best guess is it's out of ammo and not checking?
if it operates like a player its guns would need ammo checks, i guess?

Re: Actor completely stops targeting

by TDRR » Tue May 21, 2019 2:51 pm

Dan_The_Noob wrote:what does the "YeahSeen" token do exactly? it's hard to follow

--edit--
I'm just trying to follow a line from spawn to attack... does the bot have infinite ammo or something?
Also, i couldn't get bots to spawn period so have no ingame reference.
Sorry, was in a hurry yesterday so couldn't post the full instructions.

Here's some more detail: YeahSeen is a token used for basically anything but i named it like that because it originally was for checking line of sight with the target, you will see it always immediately after some codepointer, because it's an item given by those codepointers to indicate a successful script execution/jump to another "state".

You need a bot config to spawn the bots, for instance the one posted here: viewtopic.php?f=43&t=64527
Alternatively, just loading the bots in Zandronum removes the need for any bot config.
The bot's ammo is dictated by the real weapon it's carrying, internally they work like real players, not monsters, their targeting system is still almost entirely monster-like though. Which is why you can spectate them with F12 and see them actually firing their weapon exactly like a real player, animation and everything.

Re: Actor completely stops targeting

by Dan_The_Noob » Tue May 21, 2019 2:28 am

what does the "YeahSeen" token do exactly? it's hard to follow

--edit--
I'm just trying to follow a line from spawn to attack... does the bot have infinite ammo or something?
Also, i couldn't get bots to spawn period so have no ingame reference.

[SOLVED] Actor completely stops targeting

by TDRR » Tue May 21, 2019 1:31 am

*removed link*

I'm using ACS+DECO to control a player to do player-y stuff. It works just fine, except that it only attacks once or twice and once it's target is dead, it will NEVER target anything else, no matter what. I tried many different things to fix it, and none of them worked.

The relevant code is contained in Source/DECOBOT.acs and acscodepointers.dec. DECORATE also has a bit of relevant code but it's not exactly critical to the rest. Type in the console "addbot" to spawn the actor that has this problem. (Does not work in any IWAD or weapons mod that is not Doom, Heretic, Hexen, Chex Quest or Strife)

The main thinking code is in DECOBOT.acs though, and acscodepointers.dec is used mostly as an interface with the actor.

Top