CampType Goal

From MyGamingTalk
Jump to navigation Jump to search
Goal Instructions 0.8 Camp Type Goals

Fastrack

  • /bot goal_create <goaltype> <name>
    • attack
    • defend
    • camp
    • mobilemg42
    • snipe
  • /bot goal_setproperty facing 0
    • optionally set additional facings. /bot goal_setproperty facing 1 for example
  • optionally set the stance. defaults to stand for all but mobilemg42
    • /bot goal_setproperty stance crouch or /bot goal_setproperty stance prone
      • note that stance can not be set for mobilemg42 since it needs to be prone
  • /bot goal_finish

Detailed Instructions

Attack, Defend, Camp, Snipe

Description

Camp is a new goal type that is the logic behind all of these goal types. Attack, Defend, and Snipe were included to maintain backwards compatibility in map scripts that use the old names. Any of these goal types can be used when creating new goals. These goals are used to get the bots to go to and guard specific locations for some amount of time.

Setup

See the Fastrack example at the top of the page for an example setup.

Properties

Properties can be set with the goal_setproperty command assuming that the goal has been selected.
facing
Facing is the direction the bots will look when at the camp spot. Any number of facings can be defined. Multiple facings results in the bots randomly choosing which one to use every second or so; resulting in the bots 'scanning' between them. When rendering the goal, facings are represented by a blue line with a white number attached to them. The white number is the index of the aim position which makes it easier to edit specific facings should they need to be changed.


syntax: /bot goal_setproperty facing <int index>
example: /bot goal_setproperty facing 0
note: The goal itself forces facing indexes to be added sequentially. This means that trying to set facing index 99 when only 1 other facing exists will result in index 1 being set ( indexes start at 0 ).
stance
Set the stance the bot should assume while performing this action.


syntax: /bot goal_setproperty stance <string stance>
example: /bot goal_setproperty stance crouch
values: stand crouch prone
group
A group is a method of organizing sets of goals. One advantage to this is that all goals in a group can be enabled or disabled in one line of script rather than seperate goal types requiring additional lines to enable or disable them. Assigning roles to a group is also possible as an alternative to assigning each individual goal a role.


syntax: /bot goal_setproperty group <string groupName>
example: /bot goal_setproperty group myGroup
mincamptime
MinCampTime defines the minimum amount of time in seconds a bot will spend at a camp spot.


syntax: /bot goal_setproperty mincamptime <float seconds>
example: /bot goal_setproperty mincamptime 15.0
default: 2.0 seconds
maxcamptime
MaxCampTime defines the maximum amount of time in seconds a bot will spend at a camp spot.


syntax: /bot goal_setproperty maxcamptime <float seconds>
example: /bot goal_setproperty maxcamptime 30.0
default: 6.0 seconds
tagname
Sets the name of the goal. This can optionally be set when passed as the optional parameter in the goal_create command. Useful for renaming goals.


syntax: /bot goal_setproperty tagname <string name>
example: /bot goal_setproperty tagname myGoalName
role
See the section on bot roles.


syntax: /bot goal_setproperty role <role mask>
example: /bot goal_setproperty role 1
snipe
This property automatically sets the weapon limits for the goal to sniper weapons. It does not need to be used if you used /bot goal_create snipe.


syntax: /bot goal_setproperty snipe
example: /bot goal_setproperty snipe
weapon
Camp goals can be weapon limited. This means that only bots that have a specific weapon or weapons will be able to use them. Any camp goal that is weapon limited automatically gets a higher priority than camp goals without a weapon limit.


syntax: /bot goal_setproperty weapon <weapon name>
example: /bot goal_setproperty weapon panzerfaust
note: for a list of valid weapon names, issue the command without any parameters or an invalid one.
radius
Set the radius for the goal.


syntax: /bot goal_setproperty radius <int>
example: /bot goal_setproperty radius 64

MobileMg42

MobileMg42 goals are the same as the other basic camp goal types with the following exceptions:
  • Weapon property cannot be set
  • Stance property cannot be set
  • Multiple facings cannot be set

Video Tutorial Version


Adding a Defend Goal
Adding a Snipe Goal
Adding Weapon Goals