Code Monkey home page Code Monkey logo

Comments (6)

Joe91 avatar Joe91 commented on September 14, 2024

Its already done. If you have engineers, they will use the RPGs as soon as you are in a vehicle. But I can let the other classes throw grenades as well...
But is a vehicle affected by grenades?

from fun-bots.

MoxUK avatar MoxUK commented on September 14, 2024

I believe a frag will do a small amount of damage to armoured vehicles; 40mm GL do a bit of damage as well.

Problem currently is that e.g. bot not equipped to take on a tank or APC still attack with rifles and effectively give themselves away. It's logic to a bot to attack (any) target, but for a real player, it would considered instant suicide.

Alternative solution would be (in pseudocode):
If equipped with RPG, attack armoured vehicle,
else move opposite direction/find cover.

from fun-bots.

Joe91 avatar Joe91 commented on September 14, 2024

I tried a LAV with 20 bots all throwing grenades at the vehicle. No damage at all... :-/
But maybe I just let them Ignore the vehicles. What behaviour would you suggest if a player is in a vehicle? Run to cover is not possible yet ^^

from fun-bots.

MoxUK avatar MoxUK commented on September 14, 2024

I don't know how advanced it's possible to make the bots or how much effort it will take, so these might be unrealistic but:

If vehicle type = [tank, APC] and vehicle occupied by enemy
{
If Bot equipment includes RPGs, then attack with RPG
else
If Bot equipment does not include RPGs, then run away (reverse travel direction of path?) - OR - ignore vehicle
}

If vehicle type /= [tank, APC] and vehicle occupied by enemy
{
If Bot equipment includes RPGs, then attack with RPG
If Bot equipment does not include RPGs, then attack vehicle with primary weapon
}

If this is too much of a pain, then I expect ignore or reverse path would be an acceptable alternative.

from fun-bots.

lywit avatar lywit commented on September 14, 2024

The HUMVEE can be damaged by grenades. I would do it the way that MoxUK suggests but also add logic for throwing grenades at Humvees and similar armored cars in the game.

from fun-bots.

Joe91 avatar Joe91 commented on September 14, 2024

I made the bots choose the way they attack vehicles depending on the vehicle and their loadouts. Otherwise they just ignore the vehicle. This is in Version 1.7.0.10.
Still some testing needed, but a first look seemed quite promissing...

from fun-bots.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.