Jump to content

About GRENADE and WatchForProjectile


Recommended Posts

Good morning,

I'd like to raise several questions on these two things

I have setup 3 GRENADE goals having the same TargetGoal, so several bots can do it at once and the destructible gets destroyed rather quickly
A little downside of TargetGoal I have noticed is that the bot stops throwing upon the entity getting destroyed, not upon calculating the damage that will cause the last thrown grenade, so there's always an extra grenade thrown (excepted if out of ammo), but that's bearable (a bit less when multiple GRENADE goals targetting the same ent, but nothing dramatic, that's a side information)
They're far enough from the ground surface where grenades land to not cause damage to every GRENADE goal position

---

Once the bot has started that GRENADE goal, it is totally defenceless: it will keep throwing grenades until the TargetGoal is destroyed or grenades are depleted, even if it is getting shot at all along

---

Once finished by TargetGoal destroyed, that extra grenade I talked about earlier, well, the bot will go through the cleared path, not getting any WatchForProjectile, and will often blow itself up with that grenade...

---

Other thing: WatchForProjectile goal is affected upon entering WatchForProjectile radius, not checking this.AvoidRadius

Would it be a good thing to add something like the following in this.Events[EVENT.ENT_ENTER_RADIUS] before affecting this with AvoidEntClass/Priority?

if ( DistanceBetween(this.Bot.GetGameEntity(), ent) > this.AvoidRadius[ entClass ] )
{
	return;
}

---

The GRENADE radius should be lowered 250 instead of 320, 250 being the max splash damage from it

---

There's a comment about Arty being removed due to making bots locked down, same applies to grenade ^^"
Dunno if anything can be done about this

---

Once out of grenades and goal still up, when the only available goal is grenade, bots don't go grab in-range ammocab; dunno if anything can or should be done about that

---

To finish, a question: InWater and UnderWater are excluded, I guess for the run and crouch behaviour, but should there be a behaviour to evade the explosion, still?

---

Hope these points make sense ^^"

Thank you in advance!

Edited by Mateos
Wrongly tabbed and spaced...
Link to comment
Share on other sites

  • Moderators

Good morning,

Which map is it ? Does the target entity have health information which could be used to calculate exact amount of grenades needed to destroy it ?

We can't ignore EVENT.ENT_ENTER_RADIUS if distance is greater than AvoidRadius. If a bots is moving towards a grenade or a grenade is moving towards a bot, then the event is triggered once at distance 400.

If you want bots to go to ammo cabinets, you can change priority:

global OnBotJoin = function( bot )
{
	wpn = bot.GetWeapon(WEAPON.ALLY_GRENADE);
	if(wpn)
	{
		wpn.PrimaryFire.LowAmmoPriority = 0.82;
	}
};

 

Link to comment
Share on other sites

Hello,

7 hours ago, palota said:

Which map is it ? Does the target entity have health information which could be used to calculate exact amount of grenades needed to destroy it ?

1944 Huertgen Forest, with the attached WIP waypoints; Axis North Path goal, near Allied Farm spawn, the southest grenade goal is 'evaded' though actually at a safe distance

I could just move it way, as I did for one of the 3 goals, but the 3 nodes are at a safe distance

7 hours ago, palota said:

We can't ignore EVENT.ENT_ENTER_RADIUS if distance is greater than AvoidRadius. If a bots is moving towards a grenade or a grenade is moving towards a bot, then the event is triggered once at distance 400.

It's fine to have it trigger at 400 units; what I'm going for is add a check for AvoidRadius before affecting the high-priority goal making bots evade even though the ent is farther away from bot than the projectile' AvoidRadius, e. g. for the grenade entity between 400 and 320 units

7 hours ago, palota said:

If you want bots to go to ammo cabinets, you can change priority

Aight, thank you!

May I ask your pov about the other points, or do you think it's not worth considering, like benefit(s) would be too small or too much overhead to work around?

1944 Huertgen Forest.zip

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...