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

Public Member Functions

 init_package ()
 this function is called at time 0 More...
 
 reset_package ()
 this function is called at reset More...
 
 init (arg0, arg1, arg2)
 Initialize the vehicle mind at time 0. More...
 
 draw ()
 Draws debugging graphics. More...
 
 start_driving ()
 Begins driving by setting an appropriate agent behavior. More...
 
 assign_new_leader (at_end_of_path)
 Determines the vehicle that I'm directly behind. More...
 
 set_new_leader (lua_leader)
 Call to designate who leader is (or no leader) More...
 
 test_in_front_of_me (char)
 Returns if character is in front of me. More...
 
 process_messages (mesg_obj)
 Standard-form message-handling function. More...
 
 entry_point ()
 Base state function. More...
 
 decel_state (distance)
 State for coming to a gradual halt, usually when vehicle gets traffic signal. More...
 
- Public Member Functions inherited from luaUrbanEntity
 begin_state (_state_name)
 Designate a state as having been entered. More...
 
 invoke_state (state_obj, _message_handler)
 Enter a child state. More...
 
 sleep_process_messages (duration, msg_handler)
 Puts the active coroutine to sleep for the number of seconds specified. More...
 
 send_message_up_state_chain (message)
 Chained message handler communication function. More...
 
 check_higher_state_interruption ()
 Checks if a higher state requests an interruption. More...
 
 pop_stored_message_response ()
 Retrieves message response from chained event handlers. More...
 
 mark_state_interruption (_interrupt)
 For use by chained message processors. 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 luaUrbanEntity
local goto_result = self->invoke_state({state=self.goto_point_state, arg1=dest_vec, arg2=approach_dist})
 

Member Function Documentation

luaVehicleMind::assign_new_leader ( at_end_of_path  )

Determines the vehicle that I'm directly behind.

The leader of this vehicle will be the next vehicle ahead of it on its path, or none, if this vehicle will be the next to loop. If at_end_of_path is set, this call will also render leaderless the vehicle currently pursuing this one. Doesn't actually change change position of vehicle, for AI purposes only. Longer description of class.

luaVehicleMind::decel_state ( distance  )

State for coming to a gradual halt, usually when vehicle gets traffic signal.

luaVehicleMind::draw ( )

Draws debugging graphics.

luaVehicleMind::entry_point ( )

Base state function.

Essentially a travel state. The vehicle will travel along its preset path. If it is behind another vehicle, it will operate in a pursue mode. If not, it will simply travel until it reaches the end of the travel path, at which point it will teleport back to the beginning. May be interrupted by substates, such as stopping at light.

luaVehicleMind::init ( arg0  ,
arg1  ,
arg2   
)

Initialize the vehicle mind at time 0.

luaVehicleMind::init_package ( )

this function is called at time 0

luaVehicleMind::process_messages ( mesg_obj  )

Standard-form message-handling function.

luaVehicleMind::reset_package ( )

this function is called at reset

luaVehicleMind::set_new_leader ( lua_leader  )

Call to designate who leader is (or no leader)

luaVehicleMind::start_driving ( )

Begins driving by setting an appropriate agent behavior.

luaVehicleMind::test_in_front_of_me ( char  )

Returns if character is in front of me.


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