lua/wrappers/game/lua_dialogue_component.cpp
/**
	 * Attempts to start a dialogue with another game object.
	 * The other game object must have a dialogue component attached to talk to.
	 *
	 * @param am.game_object talkee The game object to talk to.
	 * @param am.dialogue [nil] with_dialogue By default the talk to function will start a conversation
	 *  using the start_dialogue value, this allows for that to be overridden for this talk.
	 * @returns am.dialogue_component This
	 */
Attempts to start a dialogue with another game object.
The other game object must have a dialogue component attached to talk to.

@param am.game_object talkee The game object to talk to.
@param am.dialogue [nil] with_dialogue By default the talk to function will start a conversation
using the start_dialogue value, this allows for that to be overridden for this talk.
Attempts to start a dialogue with another game object . The other game object must have a dialogue component attached to talk to . @param am . game_object talkee The game object to talk to . @param am . dialogue [ nil ] with_dialogue By default the talk to function will start a conversation using the start_dialogue value this allows for that to be overridden for this talk .
int DialogueComponent_talk_to(lua_State *lua)
	{
		DialogueComponent *comp = castUData<DialogueComponent>(lua, 1);
		if (comp)
		{
			GameObject *other = getGameObject(lua, 2);
			if (other)
			{
				bool valid = true;
				if (lua_gettop(lua) == 3)
				{
					Dialogue *diag = castUData<Dialogue>(lua, 3);
					if (diag)
					{
						comp->talkTo(other, diag);
					}
					else
					{
						valid = false;
					}
				}
				else
				{
					comp->talkTo(other);
				}
				if (valid)
				{
					lua_first(lua);
				}
			}
			return LuaState::expectedArgs(lua, "talk_to", "am.game_object talkee, am.dialogue_component [nil] with_dialogue");
		}
		return LuaState::expectedContext(lua, "talk_to", "am.dialogue_component");
	}
int DialogueComponent_talk_to ( lua_State * lua ) { DialogueComponent * comp = castUData < DialogueComponent > ( lua , 1 ) ; if ( comp ) { GameObject * other = getGameObject ( lua , 2 ) ; if ( other ) { bool valid = true ; if ( lua_gettop ( lua ) == 3 ) { Dialogue * diag = castUData < Dialogue > ( lua , 3 ) ; if ( diag ) { comp -> talkTo ( other , diag ) ; } else { valid = false ; } } else { comp -> talkTo ( other ) ; } if ( valid ) { lua_first ( lua ) ; } } return LuaState :: expectedArgs ( lua , " " , " " ) ; } return LuaState :: expectedContext ( lua , " " , " " ) ; }
Attempts to start a dialogue with another game object.
Attempts to start a dialogue with another game object .