DI-Guy Lua AI SDK
 All Classes Files Functions Variables Groups Pages
luaSimpleFriendlySoldier Class Reference
Inheritance diagram for luaSimpleFriendlySoldier:
luaSimpleSoldier luaCharacter

Public Member Functions

 init (arg0, arg1, arg2)
 Initialize the simple friendly soldier at time 0. More...
 
- Public Member Functions inherited from luaSimpleSoldier
 init_package ()
 This function is called at T = 0 and is responsible for creating the nav mesh. More...
 
 init (arg0, arg1, arg2)
 This function initializes the each soldier at t = 0. More...
 
 get_ui_signals ()
 This function returns a comma separated list for when a user right clicks on a character. More...
 
 on_impact_callback ()
 this function is called when an impact happens More...
 
 on_target_acquired (character_target)
 
 process_message (message_object)
 A default message processing function. More...
 
 process_callbacks (message_object)
 A default callback processing function. More...
 
 get_user_selected_path (message, use_default_ui_draw_function)
 Prompts the user to select a path. More...
 
 process_signals (message_object)
 A default signal processing function. More...
 
 process_message_travel (message_object)
 message processor function that's a bit more resistant to distraction More...
 
 process_message_travel_callbacks (message)
 message processor thats a bit more resistant to distraction More...
 
 process_message_attack (message_object)
 message processor specific to an attacking character More...
 
 process_message_attack_callbacks (message)
 callback message processor specific to an attacking character More...
 
 move_to_background_check ()
 this function is used inside of move to's to allow a traveling soldier to spot a target and attack. More...
 
 entry_point ()
 the entry point of the character, really just starts patrolling More...
 
 go_firm_state ()
 
 patrol_state ()
 the patrol path state, assumed to be an ambient state More...
 
 follow_state (sender)
 A state for following a broadcaster. More...
 
 formation_state ()
 
 guard_state ()
 The character will stand their ground and attack enemies who come into sight. More...
 
 return_to_patrol_path_state ()
 
 draw_path ()
 
 move_to_point_state (pos, message_type)
 
 move_to_path_state (path, message_type)
 
 hunt_target_state (character_target, who)
 
 attack_state (character_target, who)
 
 become_aggressive ()
 Puts soldier into a more aggressive stance, i.e. aiming weapon. More...
 
 stand_state ()
 Causes soldier to stand in one place, until new commands are received. More...
 
 knee_state ()
 Causes soldier to kneel in one place, until new commands are received. More...
 
 attention_state (character_attacker)
 Causes soldier to look at another character (including exploded IED) for a while. More...
 
 flee_state ()
 Causes soldier to flee from the most recent impact even that has affected soldier's group. More...
 
 draw_point_select ()
 
 draw ()
 
 get_schedule_signals ()
 Returns a list of supported signals that can be converted into schedule events. More...
 
 export_schedule_events ()
 Returns the custom schedule events that this class supports. More...
 
 fill_go_to_args (event_table_entry, arg_name, role_name)
 Populates schedule event arguments. More...
 
 do_go_to_event (action, role, group, location, percent, time_window)
 Handles a "go to" event for a simple soldier. 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

- Static Public Member Functions inherited from luaSimpleSoldier
static do_schedule_action (lua_class_name, group, message_string, location, percent, time_window)
 Handles a schedule event action. More...
 
- 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)
 

Detailed Description

Member Function Documentation

luaSimpleFriendlySoldier::init ( arg0  ,
arg1  ,
arg2   
)

Initialize the simple friendly soldier at time 0.

Parameters
arg0optional string, lua squad profiles specify "squad_mode" which is handled in the base class
arg1unused
arg2unused
Note

You could use arg1, and arg2 in the crowd profile to specify net_opposing and net_friendly instead of subclassing but we don't want to break backwards compatablity


The documentation for this class was generated from the following file: