Mortar Goal

From MyGamingTalk
Revision as of 08:02, 13 February 2023 by Palota (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Goal Instructions Mortar Goal

Fastrack

  • /bot goal_create mobilemortar <name>
  • /bot goal_setproperty target 0
    • optionally set additional targets. /bot goal_setproperty target 1 for example
    • the trajectory is rendered for each target to make it easier to get the correct facing
  • /bot goal_finish

Detailed Instructions

Description

Mortar is a goal for the soldiers to use the mobile mortar weapon.

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 shot; 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 ).
note: Facing property and target property share the same indexes.
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
role
See the section on bot roles.


syntax: /bot goal_setproperty role <role mask>
example: /bot goal_setproperty role 1
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
target
Target is the position where mortar projectile hits ground and explodes. Any number of targets can be defined. Multiple targets results in the bots randomly choosing which one to use every shot; resulting in the bots 'scanning' between them. When rendering the goal, trajectory is drawn from goal position to target position. Start directions are represented by blue lines with white numbers attached to them. The white number is the index which makes it easier to edit specific targets.


syntax: /bot goal_setproperty target <int index>
example: /bot goal_setproperty target 0
note: The goal itself forces target indexes to be added sequentially. This means that trying to set target index 99 when only 1 other target exists will result in index 1 being set ( indexes start at 0 ).
note: Facing property and target property share the same indexes.
radius
Set the radius for the goal.


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

Video Tutorial Version


Adding a Mortar Goal