124 if (!source || !target)
129 warning(
"TODO: ActionStartConversation: Non-PC target \"%s\"", target->getTag().c_str());
137 warning(
"Functions::actionStartConversation(): " 138 "Object \"%s\" already in conversation with PC \"%s\"",
145 if (conversation.
empty())
153 const bool noWidescreen = ctx.
getParams()[5].getInt() != 0;
154 const bool resetZoom = ctx.
getParams()[6].getInt() != 0;
170 object->playAnimation(animation);
180 if (!
object || !moveTo)
186 jumpTo(
object, moveTo->getArea(), x, y, z);
197 if (!
object || !moveTo)
203 jumpTo(
object, moveTo->getArea(), x, y, z);
215 if (!
object || !moveTo)
219 moveTo->getPosition(x, y, z);
221 jumpTo(
object, moveTo->getArea(), x, y, z);
233 if (!
object || !moveTo)
237 moveTo->getPosition(x, y, z);
239 jumpTo(
object, moveTo->getArea(), x, y, z);
An object within a Jade Empire area.
#define ResMan
Shortcut for accessing the sound manager.
void actionSpeakStringByStrRef(Aurora::NWScript::FunctionContext &ctx)
void add(const char *s,...) GCC_PRINTF(2
Object * getTriggerer() const
bool startConversation(const Common::UString &conv, Creature &pc, Object &obj, bool noWidescreen=false, bool resetZoom=true)
Start a conversation.
void actionCloseDoor(Aurora::NWScript::FunctionContext &ctx)
Module & getModule()
Return the module context.
Common::UString formatTag(const Object *object)
Construct a string with the tag of this object.
A class holding an UTF-8 string.
void assignCommand(Aurora::NWScript::FunctionContext &ctx)
void jumpTo(Jade::Object *object, Area *area, float x, float y, float z)
Context of an NWScript function.
Jade Empire engine functions.
void truncate(const iterator &it)
A placeable in a Jade Empire area.
Object * getCaller() const
void executeScript(Aurora::NWScript::FunctionContext &ctx)
static Aurora::NWScript::Object * getParamObject(const Aurora::NWScript::FunctionContext &ctx, size_t n)
The context handling the gameplay in Jade Empire.
static Placeable * toPlaceable(Aurora::NWScript::Object *object)
void getPosition(float &x, float &y, float &z) const
Return the location's position.
Aurora::NWScript::Object * getPCSpeaker() const
Return the PC currently speaking with this object.
static Creature * toPC(Aurora::NWScript::Object *object)
void actionStartConversation(Aurora::NWScript::FunctionContext &ctx)
An NCS, BioWare's NWN Compile Script.
Exception that provides a stack of explanations.
const Common::UString & getTag() const
bool close(Object *closer)
The closer object closes this placeable.
A container of Jade Empire objects.
const Common::UString & getConversation() const
Return the object's default conversation (DLG).
Basic exceptions to throw.
const char * c_str() const
Return the (utf8 encoded) string data.
static Jade::Object * toObject(::Aurora::NWScript::Object *object)
Basic Jade Empire type definitions.
const Variable & run(Object *owner=0, Object *triggerer=0)
Run the current script, from start to finish.
void delayCommand(Aurora::NWScript::FunctionContext &ctx)
void actionJumpToLocation(Aurora::NWScript::FunctionContext &ctx)
void speakString(int32 resref)
Speak the specified string.
const Common::UString & getScriptName() const
bool empty() const
Is the string empty?
bool open(Object *opener)
The opener object opens this placeable.
void warning(const char *s,...)
An object within a Jade area.
Handling BioWare's NWN Compiled Scripts.
Basic type definitions to handle files used in BioWare's Aurora engine.
void actionJumpToObject(Aurora::NWScript::FunctionContext &ctx)
Script, NWScript bytecode.
void actionDoCommand(Aurora::NWScript::FunctionContext &ctx)
void actionMoveToObject(Aurora::NWScript::FunctionContext &ctx)
void actionOpenDoor(Aurora::NWScript::FunctionContext &ctx)
static Location * toLocation(Aurora::NWScript::EngineType *engineType)
void actionMoveToLocation(Aurora::NWScript::FunctionContext &ctx)
void actionPlayAnimation(Aurora::NWScript::FunctionContext &ctx)
void unimplementedFunction(Aurora::NWScript::FunctionContext &ctx)
void printException(Exception &e, const UString &prefix)
Print a whole exception stack to stderr and the log.
const Common::UString & getName() const
Return the object's name.
The global resource manager for Aurora resources.
A creature in a Jade Empire area.
void delayScript(const Common::UString &script, const Aurora::NWScript::ScriptState &state, Aurora::NWScript::Object *owner, Aurora::NWScript::Object *triggerer, uint32 delay)