Mateos Posted January 19 Share Posted January 19 (edited) 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 January 19 by Mateos I tabbed and hit space... Quote Link to comment Share on other sites More sharing options...
Moderators palota Posted January 20 Moderators Share Posted January 20 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. Mateos 1 Quote Link to comment Share on other sites More sharing options...
Mateos Posted January 20 Author Share Posted January 20 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 Quote Link to comment Share on other sites More sharing options...
Moderators palota Posted January 21 Moderators Share Posted January 21 I committed modified goal_mobilemortar.gm to SVN, so it's available to all. Mateos 1 Quote Link to comment Share on other sites More sharing options...
Mateos Posted January 21 Author Share Posted January 21 (edited) 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 January 21 by Mateos Quote Link to comment Share on other sites More sharing options...
Moderators palota Posted January 22 Moderators Share Posted January 22 If you need to suspend mortar shooting for a specific goal, you can try to change Map.DontShootMortar to this.MapGoal.DontShootMortar. Mateos 1 Quote Link to comment Share on other sites More sharing options...
Mateos Posted January 22 Author Share Posted January 22 Yes, that's the best solution, so it's bound to the goal and not the bot using it, far better ^^ Thank you again! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.