![]() |
DI-Guy SDK Documentation
13.8
|
A class that represents the layout of a group of characters. More...
#include <diguyFormation.h>
Public Member Functions | |
General Functions | |
Unless otherwise specified, all are callable from:
| |
| const char * | get_name () |
| Returns the name of the object. More... | |
| int | set_name (const char *name) |
| This function sets the name of this object. More... | |
| const char * | get_type_name () |
| Returns: type name of the object; this value will never be NULL. More... | |
| const char * | get_guide_name () |
| Returns: guide name used by this formation. More... | |
| int | set_num_followers (int number) |
| Sets number of followers in the formation. More... | |
| int | get_num_followers () |
| Returns: number of members of formation (leader not included) More... | |
| int | set_follower_rz_offset (int follower_index, float rz) |
| Sets rz offset of member relative to leader. More... | |
| const char * | to_lua_string (float relative_x=0.0f, float relative_y=0.0f) |
| Creates a string describing the formation, with positions being relative to relative_x and relative_y. More... | |
| float | get_follower_x_offset (int follower_index) |
| Gets x offset of formation member relative to leader. More... | |
| float | get_follower_y_offset (int follower_index) |
| Gets y offset of formation member relative to leader. More... | |
| float | get_follower_rz_offset (int follower_index) |
| Gets rz (or yaw) of formation member relative to leader. More... | |
| int | set_role_name (int follower_index, const char *role_name) |
| Sets role name of member. More... | |
| const char * | get_role_name (int follower_index) |
| Gets role. More... | |
| const char * | get_follower_instance (int follower_index) |
| int | set_follower_instance (int follower_index, const char *name) |
| int | set_subgroup_size (int size) |
| Sets subgroup size. More... | |
| int | get_subgroup_size () |
| Gets size of subgroup. More... | |
| int | get_num_subgroups () |
| Get number of subgroups. More... | |
| int | set_first_subgroup_index (int index) |
| Sets index of first subgroup. More... | |
| int | get_first_subgroup_index () |
| Gets index of first formation member that's in a subgroup. More... | |
| int | set_follower_offset (int follower_index, float x, float y) |
| Sets x, y offsets of member relative to leader. More... | |
| float | get_radius () |
| Returns: radius of formation, in meters. More... | |
Private Functions | |
The functions and variables past this point are for internal use only. No external access to them is expected or necessary. | |
| bdiScenarioFormation * | m_scripted_object |
| A pointer to internal data. More... | |
| class | bdiScenarioFormation |
| bdiScenarioFormation * | get_scripted_object () |
| diguyFormation (bdiScenarioFormation *formation) | |
| A private constructor. More... | |
A class that represents the layout of a group of characters.
Usually, this is used for military-style formations.
|
private |
A private constructor.
| const char* diguyFormation::get_name | ( | ) |
Returns the name of the object.
This pointer will never be NULL.
Returns:
name of the object
| int diguyFormation::set_name | ( | const char * | name | ) |
This function sets the name of this object.
Returns:
0 on success, -1 on failure
| const char* diguyFormation::get_type_name | ( | ) |
Returns: type name of the object; this value will never be NULL.
| const char* diguyFormation::get_guide_name | ( | ) |
Returns: guide name used by this formation.
| int diguyFormation::set_num_followers | ( | int | number | ) |
Sets number of followers in the formation.
| number | number of followers in this formation |
Returns:
0 if success
| int diguyFormation::get_num_followers | ( | ) |
Returns: number of members of formation (leader not included)
| int diguyFormation::set_follower_rz_offset | ( | int | follower_index, |
| float | rz | ||
| ) |
Sets rz offset of member relative to leader.
| follower_index | index of follower to modify |
| rz | orientation of member relative to leader, in degrees |
Returns:
0 if success
| const char* diguyFormation::to_lua_string | ( | float | relative_x = 0.0f, |
| float | relative_y = 0.0f |
||
| ) |
Creates a string describing the formation, with positions being relative to relative_x and relative_y.
| relative_x,relative_y | relative positions in meters |
Returns:
string containing lua script
| float diguyFormation::get_follower_x_offset | ( | int | follower_index | ) |
Gets x offset of formation member relative to leader.
| follower_index | index of follower in formation (does not include leader) |
Returns:
x offset in meters
| float diguyFormation::get_follower_y_offset | ( | int | follower_index | ) |
Gets y offset of formation member relative to leader.
| follower_index | index of follower in formation (does not include leader) |
Returns:
y offset in meters
| float diguyFormation::get_follower_rz_offset | ( | int | follower_index | ) |
Gets rz (or yaw) of formation member relative to leader.
| follower_index | index of follower in formation (does not include leader) |
Returns:
rz offset in degrees
| int diguyFormation::set_role_name | ( | int | follower_index, |
| const char * | role_name | ||
| ) |
Sets role name of member.
| follower_index | index of follower to modify |
| role_name | new role |
Returns:
0 if success
| const char* diguyFormation::get_role_name | ( | int | follower_index | ) |
Gets role.
Roles generally correlate with a character's carried object.
RYAN: Give a little more information on what roles are, and at least one example.
| follower_index | index of follower in formation (does not include leader) |
Returns:
string containing role, or "character" if specific role specified
| const char* diguyFormation::get_follower_instance | ( | int | follower_index | ) |
| follower_index | index of follower in formation (does not include leader) |
Returns:
string containing name of follower, if defined
| int diguyFormation::set_follower_instance | ( | int | follower_index, |
| const char * | name | ||
| ) |
| follower_index | index of follower in formation (does not include leader) string containing name of follower, |
| int diguyFormation::set_subgroup_size | ( | int | size | ) |
Sets subgroup size.
If > 0, this means that there are subgroups and that they will be applied.
RYAN: What is a subgroup? What is it used for? Can there be only one?
| size | size of subgroup |
Returns:
0 if success
| int diguyFormation::get_subgroup_size | ( | ) |
Gets size of subgroup.
If > 0, this means that there are subgroups and that they will be applied.
Returns:
number of followers in subgroup
| int diguyFormation::get_num_subgroups | ( | ) |
Get number of subgroups.
Returns:
number of subgroups
| int diguyFormation::set_first_subgroup_index | ( | int | index | ) |
Sets index of first subgroup.
Any members before this member are not in a subgroup.
| index | index of first follower in subgroup |
Returns:
0 if success
| int diguyFormation::get_first_subgroup_index | ( | ) |
Gets index of first formation member that's in a subgroup.
Returns:
index of formation member
| int diguyFormation::set_follower_offset | ( | int | follower_index, |
| float | x, | ||
| float | y | ||
| ) |
Sets x, y offsets of member relative to leader.
| follower_index | index of follower to modify |
| x,y | offsets of member relative to leader, in meters |
RYAN: Does follower_index include leader?
Returns:
0 if success
| float diguyFormation::get_radius | ( | ) |
Returns: radius of formation, in meters.
RYAN: Radius of what? Relative to what? The leader?
|
inline |
|
friend |
|
private |
A pointer to internal data.