|
DI-Guy Lua AI SDK
|
Public Member Functions | |
Framework Functions | |
A soldier character for use in Middle Eastern scenario A US soldier that deploys from a Humvee, as part of a team of four. This character performs various combat behaviors, such as taking a defensive stance, engaging an enemy, and retreating from scene. It also makes use of the messaging system to influence the behavior of civilian characters. | |
| init () | |
| standard init function called at t = 0 More... | |
| heartbeat () | |
| Standard heartbeat function. More... | |
Message and Callback Processing Functions | |
| on_impact_callback () | |
| callback for responding to weapon impact More... | |
| process_messages_attack (message_object) | |
| Message handler called during attack_state. More... | |
| process_messages (message_object) | |
| General message handler. More... | |
| process_signals (message_object) | |
| General signal handler. More... | |
State Functions | |
| react_to_molotov_state () | |
| State for reacting to thrown firebomb. More... | |
| react_to_rpg_state (impact) | |
| State for reacting to RPG impact. Character might die. More... | |
| idle_state () | |
| State for standing around, doing not much. More... | |
| entry_point () | |
| The default state of the character's mind. More... | |
| attack_state (character_target, who) | |
| Attack a target. More... | |
| aggressive_state () | |
| Combat-ready state. More... | |
| stand_state () | |
| Standing around state. More... | |
| knee_state () | |
| Down-on-a-knee state. Affects civilians. More... | |
| evac_state (sender) | |
| State for evacuating character to a helicopter, currently not used. More... | |
| move_to_point_state () | |
| State for sending character to user-selected point. Other friendlies will follow. More... | |
| retreat_state () | |
| State for retreating to hard-coded position. Other friendlies will follow. More... | |
UI Functions | |
| draw_point_select () | |
| Draw a selection point where the mouse is. More... | |
| draw () | |
Public Member Functions inherited from luaMiddleEastBaseClass | |
| show_speech_balloon (text) | |
| shows a solid white speech ballon over the characters head. More... | |
| show_thought_balloon (text) | |
| shows a white semi transparent thought ballon over the characters head. More... | |
| hide_thought_balloon () | |
| hides the thought/speech ballon More... | |
| die_now () | |
| cleans up the label on death More... | |
| set_desired_orientation_to_target (character_target) | |
| turns the character towards a target. Character should be in idle behavior More... | |
| set_desired_orientation_to_impact (impact) | |
| turns the character towards a impact. Character should be in idle behavior More... | |
| convert_to_ragdoll (vx, vy, vz) | |
| On a high velocity impact this turns the character into a simple ragdoll. More... | |
Public Member Functions inherited from luaCharacter | |
| get_ui_signals () | |
| This function returns a comma separated list of signals that the agent is currently willing to accept. More... | |
| get_ui_state_label () | |
| This function returns a string that the DI-Guy Scenario UI will add onto the end of the state name label. More... | |
| one_time_init () | |
| This function is called when a mind is first created, currently no ops. More... | |
| init (arg0, arg1, arg2) | |
| This function is called at t=0 or when a mind is created, currently no ops. More... | |
| reset () | |
| This function resets the luaCharacter representation, called by c++ on scenario reset. More... | |
| destroy () | |
| This function is called by C++ when the character is destroyed. Overload it to trigger any world cleanup on destruction. More... | |
| die_now () | |
| This function is called when the character is killed. Overload it to trigger any final events or agent clean up on death. More... | |
| draw () | |
| This function is called by diguy scenario to draw a lua object Overload it to create your own Drawing behavior. More... | |
| entry_point () | |
| This function is called by the state manager as the entry point into the lua state machine. Overload it to create your own HFSM. More... | |
| send_message_to_character (to, from, msg_type, message, params) | |
| Send a message from a character to a character, will automatically send message over network. More... | |
| state_manager (sender, message_type, message, params) | |
| This is the main entry point from C++ into the lua framework. More... | |
| sleep (duration) | |
| sleep_until (wake_time) | |
| sleep_ignore_messages (duration) | |
| This is a simple sleep function, it will put the character to sleep for the duration specified. Messages will not be processed. More... | |
| sleep_process_messages (duration, message_handler) | |
| This is a sleep function that can take a message_handler function. More... | |
| wait_for_message (message_to_wait_for, message_handler, bg_check_func, bg_freq) | |
| This is a sleep function that will wait a long time and only wake up when a specific message is recieved. More... | |
| wait_for_multichoice (...) | |
| This is a sleep function that will wait a long time and only wake up when one of a few specific messages are recieved. More... | |
| internal_get_user_selected (options) | |
| Internal support function used by other picking functions. More... | |
| get_user_selected_point (_options) | |
| Function returns a point in the world, picked via the UI. More... | |
| get_user_selected_character (_options) | |
| Function returns a character in the world, picked via the ui. More... | |
| simple_move_to_state (x, y, z, message_handler, bg_check_func, bg_check_freq, force_a_star) | |
| This function implements a simple move to state. More... | |
| simple_move_to_path_state (path, message_handler, bg_check_func, bg_check_freq, force_a_star) | |
| get_state_name (state_function, object) | |
| Convenience function for printing the name of a state, given a function_pointer. More... | |
| begin_state (_name) | |
| Convenience function for storing the current state in the luaCharacter. More... | |
| get_current_and_previous_states () | |
| Convenience function for debugging. Returns comma-separated list of recent states. More... | |
| is_new_state (ret) | |
| Convenience function for checking if the argument is a new state table. More... | |
| invoke_state (new_state, cleanup_function, extra_info) | |
| Convenience function for doing a tail call function invokation. More... | |
| draw_path () | |
| Function that draws the character's current path object. More... | |
| draw_line_from_self () | |
| Function draws a line from self to the point under the mouse, plus it either a circle under the mouse point. More... | |
| get_user_selected_path (message, use_default_ui_draw_function) | |
| Function returns a string and a path clicked in the world, picked via the UI. More... | |
| scheduler_heartbeat () | |
| Experimental - heartbeat function for the post event sceduler. More... | |
| add_scheduled_event (callback_data) | |
| Experimental - adds a function to happen in the future. More... | |
| update_scheduler () | |
| process_messages_enroute (message_obj) | |
Additional Inherited Members | |
Public Attributes inherited from luaCharacter | |
| userdata | character |
| a pointer to the underlying character; More... | |
| coroutine | state_coroutine |
| a microthread that holds the current state of the VM; More... | |
| MESSAGE_HANDLED = -1 | |
| init_code = | |
| Constructor Template String. More... | |
| local | character = this_scenario->find_character("CHARACTER_NAME") |
| DERIVED_CLASS = BASE_CLASS->new(character) | |
| luaMiddleEastSoldier::aggressive_state | ( | ) |
Combat-ready state.
| luaMiddleEastSoldier::attack_state | ( | character_target | , |
| who | |||
| ) |
Attack a target.
| character_target | diguyCharacter |
| who | string containing "group" or "just_one" |
| luaMiddleEastSoldier::draw | ( | ) |
| luaMiddleEastSoldier::draw_point_select | ( | ) |
Draw a selection point where the mouse is.
| luaMiddleEastSoldier::entry_point | ( | ) |
The default state of the character's mind.
| luaMiddleEastSoldier::evac_state | ( | sender | ) |
State for evacuating character to a helicopter, currently not used.
| luaMiddleEastSoldier::heartbeat | ( | ) |
Standard heartbeat function.
| luaMiddleEastSoldier::idle_state | ( | ) |
State for standing around, doing not much.
| luaMiddleEastSoldier::init | ( | ) |
standard init function called at t = 0
| luaMiddleEastSoldier::knee_state | ( | ) |
Down-on-a-knee state. Affects civilians.
| luaMiddleEastSoldier::move_to_point_state | ( | ) |
State for sending character to user-selected point. Other friendlies will follow.
| luaMiddleEastSoldier::on_impact_callback | ( | ) |
callback for responding to weapon impact
| luaMiddleEastSoldier::process_messages | ( | message_object | ) |
General message handler.
| luaMiddleEastSoldier::process_messages_attack | ( | message_object | ) |
Message handler called during attack_state.
| luaMiddleEastSoldier::process_signals | ( | message_object | ) |
General signal handler.
| luaMiddleEastSoldier::react_to_molotov_state | ( | ) |
State for reacting to thrown firebomb.
| luaMiddleEastSoldier::react_to_rpg_state | ( | impact | ) |
State for reacting to RPG impact. Character might die.
| luaMiddleEastSoldier::retreat_state | ( | ) |
State for retreating to hard-coded position. Other friendlies will follow.
| luaMiddleEastSoldier::stand_state | ( | ) |
Standing around state.