Grenade Goal

From MyGamingTalk
Jump to navigation Jump to search
Goal Instructions 0.8 Grenade Goal

Fastrack

  • /bot goal_create grenade <name>
  • /bot goal_setproperty targetgoal <goal name>
    • optionally use /bot goal_setproperty trace if targeting an entity without a goal name
  • /bot goal_setproperty facing
    • setting the facing will render the trajectory

Detailed Instructions

Description

Grenade is a goal to have a bot throw a grenade at a target entity or goal.

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.


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
facing
Sets the facing for the goal.


syntax: /bot goal_setproperty facing <optional clear>
example: /bot goal_setproperty facing
example: /bot goal_setproperty facing clear // clears the facing for the goal
note: once the facing is set, the trajectory of the grenade will be rendered.
targetgoal
This property specifies a goal that the bot should target. It can be any goal which has an entity. For example: MOUNTMG42, EXPLODE, MOVER.
syntax: /bot goal_setproperty targetgoal <goal name>
example: /bot goal_setproperty targetgoal MOUNTMG42_somemg
note: if a trace entity is specified, a targetgoal is not used
trace
Runs a trace based on where the player is aiming and stores the information for the goal. The optional traceType parameter is often needed for grates which are detected only by trace type PLAYERCLIP.
syntax: /bot goal_setproperty trace <optional traceType>
example: /bot goal_setproperty trace ALL
note: this is optional. should only be used if the target is not a map goal.
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
prime
Sets the time in seconds that the bot should hold the fire button before releasing. Useful for elevated targets.


syntax: /bot goal_setproperty prime <int seconds>
example: /bot goal_setproperty prime 2
note: valid values are from 0 to 3. anything over 3 will be set to 3. default is 1.
count
Sets the maximal number of grenades to throw.


syntax: /bot goal_setproperty count <int>
example: /bot goal_setproperty count 1

Video Tutorial Version


Adding a Grenade Goal