Jump to content

Temporarily disable a specific bot shooting


Recommended Posts

Good morning,

I have scripted a system which automatically tracks a vehicle movement to adjust mortar targeting all along

When the vehicle is at a destructible like a barrier, and that destructible gets planted, I'd like the mortar bot to stop shooting, but keep its goal (so stay crouched and deployed), until everything is either defused or destroyed

I've looked at the dontshoot command to see if I could use that; I see there's a Shooting Disabled flag

Is is a right way to go? If so, how can I set/unset that flag through script?

Thank you in advance

Regards

Mateos

Edited by Mateos
I tabbed and hit space...
Link to comment
Share on other sites

  • Moderators

The command dontshoot is used to disable attacking enemies. It does not work for scripted goals (mortar, grenade, airstrike).

You can modify line 72 in file goal_mobilemortar.gm:

if (!Map.DontShootMortar) {
	this.Bot.FireWeapon();
}

Then set Map.DontShootMortar in planted/defused/destroyed triggers.

Link to comment
Share on other sites

Nice!

Do you think this is something that could be added in OB, so it's available to all?

I don't think other weapon goals (especially large radius, explosive-kind weapons) would benefit from that (a simple make unavailable is fine, for e. g. airstrike/arty), so that they would do something else

Only the mortar has that deployment requirement, with large radius/damage

Link to comment
Share on other sites

Thank you very much! ^^

It seems the forum's account can't be used to login to the Wiki, and creating new accounts seems disabled; is it possible to either get an account or that you add that documentation to the mortar page? ^^"

Edit: Just realized this will suspend ALL mortar shooting, just not one btw ^^" This perhaps should be something like this.Bot.DontShootMortar?

Edited by Mateos
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...