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

Roles defined later during map progress

- - - - -

  • Please log in to reply
1 reply to this topic

#1
Mateos

Mateos

    Senior Member

  • Members
  • 1,100 posts
  • LocationFrance

Good evening,

 

For 1944 Overlord, I’d like to set up roles for the Library, only when both documents are available (down and upstairs)

 

On map load, for Axis, AllBots is false, because there’s no role at that time, then one is added when the Axis Bunker Wall is destroyed, but I don’t want all bots to do it…

 

First try, I did not make the table in Map.Roles.AXIS, and I had 0 bots affected to the goals having the roles

 

Then, I’ve added the two tables with voice and numbots, and I had 1 bot per role…

 

The thing is, at this step, beside Engineer goals, there’s only DEFEND goals for Axis, so I had Axis bots roaming around without any objective, while there were room for goals with roles…

 

I tried to do Map.Roles.AXIS.AllBots = true; before adding the roles to the goals, doesn’t change anything

 

Code:

// If both conditions are met, add roles to them
// Else, clear the roles
if ( Map.areLowerDocumentsAvailable && Map.areUpperDocumentsReachable )
{
    Map.Roles.AXIS.AllBots = true;

    Util.SetRoleForTable( Goals.Axis.Library.Bottom, Roles.Axis.Library.Bottom );
    Util.SetRoleForTable( Goals.Axis.Library.Top, Roles.Axis.Library.Top );
}
else
{
    Util.ClearRoleForTable( Goals.Axis.Library.Bottom, Roles.Axis.Library.Bottom );
    Util.ClearRoleForTable( Goals.Axis.Library.Top, Roles.Axis.Library.Top );
}

What am I missing here?

 

Attached the current script

 

Attached Files


mateos1.png


#2
palota

palota

    Senior Member

  • Administrators
  • 561 posts

AllBots=true must be defined in Map.Roles table. It cannot change during game because bots choose their role once when they are added to game.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users