Jump to content

Welcome to Omni-bot Forums
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. If you already have an account, login here - otherwise create an account for free today!
Photo

Discussion about managing available goals per bot

- - - - -

  • Please log in to reply
3 replies to this topic

#1
Mateos

Mateos

    Senior Member

  • Members
  • 1,094 posts
  • LocationFrance

Good evening,

 

I have two cases of attacking bots that could possibly get stuck inside an area where some objectives were enabled before the area gets closed

 

In other words, for instance on 1944 Overlord, Allied bots can get inside the Bunker on the Beach through the Forward Bunker Doors when the Axis Bunker Wall isn't destroyed yet. But if Axis build these doors, Allies can potentially be "trapped" inside the bunker, and the current goal management simply disables all the Allies goals inside it. There's no nav to leave the area back to the Beach (Axis doors), so Allies inside end up roaming in the second map area...

 

I could make a nav to jump back to the Beach, but heh, since they're inside, I want them to do the reachable obj, while the ones still in the Beach area do the Beach area goals!

 

In 2014, palota scripted a little trick for Dingenskirchen using Roles at bot level to make them go to a specific CAPPOINT goal depending on their FLAG goal

This can be done with bot.SetRoles

 

I'd like to know if it would be a good idea to have something like bot.SetAvailableMapGoal( boolean, goal ); syntax (the bot already has a team, Wiki says TEAM only has AXIS and ALLIES values, not spectator, so perhaps is enough? I usually cycle through BotTable without issue but haven't tested ^^')

 

In a second time, the scripter would have to add region triggers at the correct spawn locations (in my case, at the Beach spawns), to disable the goal if between the limbo time and respawn the inside goals are still not reachable from there

It's better to do it manually and not always because the availability from the outside of the area can change meanwhile

 

So, all in all, additionally to the little bot-level script line, for a correct behaviour, it would require an extra step not to be missed in most cases...

It doesn't sound clean, but here I think about spawn management, which has a "similar" concern (http://omni-bot.invi...Changing_spawns)

If this is validated, it could see as well a specific Wiki page and references where applicable

 

So... Am I thinking too much or does it sound good? ^^'

 

Or have I missed some way to do it already (aside Role trick)?

 

Regards,

 

Mateos


mateos1.png


#2
palota

palota

    Senior Member

  • Administrators
  • 550 posts

I've already solved the same problem on map sfx_endor. You can use roles. Create a large trigger region on the beach to clear the role and the second trigger region inside the bunker behind the door to set the role. Use function Util.ClearRoleForTable when the door or wall is destroyed and Util.SetRoleForTable when the door is built.

 



#3
palota

palota

    Senior Member

  • Administrators
  • 550 posts

It is possible to use one trigger function for two regions. You can also remove empty OnExit function.

   Allied_Spawn_Trigger =
    {
        Name = "Allied_Spawn_Trigger",
        TriggerOnClass = CLASS.ANYPLAYER,

        OnEnter = function( ent )
        {
            Map.ClearRole( ent, Roles.Allies.Bunker );
        },
    },
    OnTriggerRegion( AABB( -1901.688, 3133.092, 41.125, -1723.998, 3343.194, 115.125 ), Map.Allied_Spawn_Trigger ); //West spawn
    OnTriggerRegion( AABB(  1065.164, 2620.570, 41.337,  1256.277, 2902.938, 115.337 ), Map.Allied_Spawn_Trigger ); //East spawn

  • Mateos likes this

#4
Mateos

Mateos

    Senior Member

  • Members
  • 1,094 posts
  • LocationFrance

Ah yes, since I call the very same code, and it's what I did for two triggers which have the same wm_announce heh

I also wasn't sure if OB would be upset to miss the Exit function, haven't tested it out, now I know, ty :)


mateos1.png





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users