105 object->setVariable(varName, ctx.
getParams()[2].getInt());
112 object->setVariable(varName, ctx.
getParams()[2].getInt() != 0);
119 object->setVariable(varName, ctx.
getParams()[2].getFloat());
126 object->setVariable(varName, ctx.
getParams()[2].getString());
133 object->setVariable(varName, ctx.
getParams()[2].getObject());
174 object->getPosition(x, y, z);
179 #define SQR(x) ((x) * (x)) 185 if (!object1 || !object2)
224 while ((
object = search->next())) {
244 size_t nth = MAX<int32>(ctx.
getParams()[2].getInt() - 1, 0);
249 std::list<Object *> objects;
250 while ((
object = search->next())) {
253 if (!nwnObject || (nwnObject == target) || (nwnObject->
getArea() != target->
getArea()))
263 if (type & (1 << (objectType - 1)))
264 objects.push_back(nwnObject);
269 std::list<Object *>::iterator it = objects.begin();
270 for (
size_t n = 0; (n < nth) && (it != objects.end()); ++n)
273 if (it != objects.end())
288 object->playAnimation(animation);
295 if (!
object || !moveTo)
301 jumpTo(
object, moveTo->getArea(), x, y, z);
311 if (!
object || !moveTo)
315 moveTo->getPosition(x, y, z);
317 jumpTo(
object, moveTo->getArea(), x, y, z);
322 ctx.
getReturn() =
object->getConversation();
335 bool noCollide = ctx.
getParams()[1].getInt() != 0;
337 object->setNoCollide(noCollide);
An object within a Jade Empire area.
void getEnteringObject(Aurora::NWScript::FunctionContext &ctx)
void getObjectType(Aurora::NWScript::FunctionContext &ctx)
void getExitingObject(Aurora::NWScript::FunctionContext &ctx)
void setLocalObject(Aurora::NWScript::FunctionContext &ctx)
Object * getTriggerer() const
Area * getArea() const
Return the area this object is currently in.
Module & getModule()
Return the module context.
void jumpToObject(Aurora::NWScript::FunctionContext &ctx)
A class holding an UTF-8 string.
void jumpTo(Jade::Object *object, Area *area, float x, float y, float z)
void getNearestObject(Aurora::NWScript::FunctionContext &ctx)
Context of an NWScript function.
Jade Empire engine functions.
void setLocalBool(Aurora::NWScript::FunctionContext &ctx)
Object * getCaller() const
static Aurora::NWScript::Object * getParamObject(const Aurora::NWScript::FunctionContext &ctx, size_t n)
The context handling the gameplay in Jade Empire.
void getLocalFloat(Aurora::NWScript::FunctionContext &ctx)
void setLocalString(Aurora::NWScript::FunctionContext &ctx)
void getPosition(float &x, float &y, float &z) const
Return the location's position.
static Waypoint * toWaypoint(Aurora::NWScript::Object *object)
void getLocalString(Aurora::NWScript::FunctionContext &ctx)
static Creature * toPC(Aurora::NWScript::Object *object)
void getLocalInt(Aurora::NWScript::FunctionContext &ctx)
void getObjectByTag(Aurora::NWScript::FunctionContext &ctx)
A simple scoped smart pointer template.
A class able to sort objects by distance to a target object.
A container of Jade Empire objects.
void getIsPC(Aurora::NWScript::FunctionContext &ctx)
static Jade::Object * toObject(::Aurora::NWScript::Object *object)
static UString format(const char *s,...) GCC_PRINTF(1
Print formatted data into an UString object, similar to sprintf().
void getTag(Aurora::NWScript::FunctionContext &ctx)
Basic Jade Empire type definitions.
void getArea(Aurora::NWScript::FunctionContext &ctx)
Object * getObject() const
Utility templates and functions.
void getDistanceToObject(Aurora::NWScript::FunctionContext &ctx)
void setVector(float x, float y, float z)
void getIsObjectValid(Aurora::NWScript::FunctionContext &ctx)
ObjectSearch * findObjectsByTag(const Common::UString &tag) const
Return a search context to iterate over all objects with this tag.
ObjectSearch * findObjects() const
Return a search context to iterate over all objects.
void setLocalFloat(Aurora::NWScript::FunctionContext &ctx)
bool empty() const
Is the string empty?
A scoped plain pointer, allowing pointer-y access and normal deletion.
void setLocalInt(Aurora::NWScript::FunctionContext &ctx)
virtual void getPosition(float &x, float &y, float &z) const
Return the object's position within its area.
void getPosition(Aurora::NWScript::FunctionContext &ctx)
Object * getLastTriggerer() const
Return the object that last triggered this object.
void getLocalBool(Aurora::NWScript::FunctionContext &ctx)
An object within a Jade area.
Common::UString & getString()
void getWaypointByTag(Aurora::NWScript::FunctionContext &ctx)
void getLocalObject(Aurora::NWScript::FunctionContext &ctx)
void jumpToLocation(Aurora::NWScript::FunctionContext &ctx)
static Location * toLocation(Aurora::NWScript::EngineType *engineType)
void getPriorActivation(Aurora::NWScript::FunctionContext &ctx)
void getObjectConversationResref(Aurora::NWScript::FunctionContext &ctx)
void getLocation(Aurora::NWScript::FunctionContext &ctx)
void setObjectNoCollide(Aurora::NWScript::FunctionContext &ctx)
ObjectType getType() const
Return the exact type of the object.
void clear()
Clear the string's contents.
void playAnimation(Aurora::NWScript::FunctionContext &ctx)