zParserExtender implements various proxy classes that can be used to access game world objects.
Warning
It is not recommended to implement complex mechanics using these classes and functions. They are present as a simple backup option for accessing game world objects and for quick fixes.
C_VOB
This class represents basic pointer to a game world object.
/// Returns the current position of the object in the world/// /// @param vob vob to ge the position of/// @return C_Position instance - position of the VOBfuncC_PositionVob_GetVobPosition(varC_Vobvob){};/// Sets the current position of the object in the world/// /// @param vob vob to get the position of/// @param pos new position of the vobfuncvoidVob_SetVobPosition(varC_Vobvob,varC_Positionpos){};
Note
The following classes define properties of C_VOB objects or classes derived from it.
classC_VOB_DATA{varstringName;// object namevarfloatVisualAlpha;// object's transparency 0.0 - 1.0varintShowVisual;// display the modevarintDrawBBox3D;// show objects bounding boxvarintVisualAlphaEnabled;// enables objects transparencyvarintPhysicsEnabled;// enables object's physicsvarintIgnoredByTraceRay;// allow any object collisionsvarintCollDetectionStatic;// allow collision with static world polygonsvarintCollDetectionDynamic;// allow collision with dynamic world objectsvarintCastDynShadow;// display shadow of the objectvarintLightColorStatDirty;// allow static lighting of the objectvarintLightColorDynDirty;// allow dynamic lighting of the objectvarintSleepingMode;// sets object's activity mode (0 - inactive, 1 - active, 2 - AI only)varintDontWriteIntoArchive;// turns of the serialization of this object to the save file };
/// Returns the universal data of the zCVob object////// @param vob VOB to get the position of/// @return general vob data C_Vob_DatafuncC_Vob_DataVob_GetVobData(varC_Vobvob){};/// Sets the universal data to a zCVob object////// @param vob VOB to get the position of/// @param data general vob data C_Vob_DatafuncvoidVob_SetVobData(varC_Vobvob,varC_Vob_Datadata){};
classC_LIGHT_DATA{varintR;// red light intensityvarintG;// green light intensityvarintB;// blue light intensityvarintRange;// radiusvarintRangeInv;// varintRangeBackup;// varintRangeAniActFrame;// current light animation frame for the radiusvarintRangeAniFPS;// speed of light animation for the radiusvarintColorAniActFrame;// current light animation frame for colourvarintColorAniFPS;// speed of light animation for colourvarintSpotConeAngleDeg;// angle of cone light sourcevarintIsStatic;// whether the source is staticvarintRangeAniSmooth;// [UNUSED]varintRangeAniLoop;// [UNUSED]varintColorAniSmooth;// allows soft transitions between coloursvarintColorAniLoop;// [UNUSED]varintIsTurnedOn;// whether the light source is onvarintLightQuality;// source quality (when statically compiling light) (0 - high, 1 - medium, 2 - low)varintLightType;// type of source (at static light compilation) (0 - point, 1 - cone)};
/// Returns zCVobLight object data////// @param vobLight vobLight object/// @return C_Light_Data of the lightfuncC_Light_DataVob_GetLightData(varC_VobvobLight){};/// Sets the data of a zCVobLight object////// @param vobLight object to apply the light data to/// @param data C_Light_Data light data to be setfuncvoidVob_SetLightData(varC_VobvobLight,varC_Light_Datadata){};/// Clears the list of animation colours for the light source////// @param vobLight light vobfuncvoidVob_ClearLightAniList(varC_VobvobLight){};/// Adds a color to the colour list////// @param vobLight object to apply the colour to/// @param col colour to be appliedfuncvoidVob_AddLightAniColor(varC_VobvobLight,varC_Colorcol){};/// Adds a color to the colour list////// @param vobLight object to apply the colour to/// @param r red colour channel/// @param g green colour channel /// @param b blue colour channelfuncvoidVob_AddLightAniColorRGB(varC_VobvobLight,varintr,varintg,varintb){};
classC_MOB_DATA{varstringVisibleName;// name shown above the objectvarintHitpoints;// number of hitpointsvarintDamage;// damage the object can causevarintIsDestroyed;// if the object is destroyedvarintMoveable;// whether the object can be movedvarintTakeable;// whether the object can be takenvarintFocusOverride;// if the object will redefine focus in combat modevarintSndMat;// object's material (0 - wood, 1 - stone, 2 - metal, 3 - skin, 4 - clay, 5 - glass)varstringVisualDestroyed;// model when the object is destroyedvarstringOwnerStr;// name of the instance of the owner of the objectvarstringOwnerGuildStr;// name of the guild of the objectvarintOwner;// instance of the ownervarintOwnerGuild;// guild instancevarintFocusNameIndex;// the script string of the displayed name};
/// Returns the data of the oCMOB object////// @param mob oCMOB object/// @return mob datafuncC_Mob_DataVob_GetMobData(varC_Vobmob){};/// Sets the data of the oCMOB object////// @param mob oCMOB object/// @param data C_Mob_Data to be set funcvoidVob_SetMobData(varC_Vobmob,varC_Mob_Datadata){};
C_MOBINTER_DATA
Represents data for the interactive object oCMobInter
classC_MOBINTER_DATA{varstringTriggerTarget;// object name which will be triggered by OnTriggervarstringUseWithItem;// name of the object instance that is needed for interactionvarstringSceme;// name of the scene that corresponds to the object and character animationsvarstringConditionFunc;// scripting condition under which the interaction can be performedvarstringOnStateFuncName;// the name pattern of the functions that will be called when the object changes the statevarintState;// the current state of the objectvarintState_num;// number of object's statesvarintState_target// current state of the objectvarintRewind;// prohibits object updatingvarintMobStateAni;// current animation of the objectvarintNpcStateAni;// current character animation};
/// Returns the data of the oCMobInter object////// @param mobInter oCMobInter object/// @return MobInter_Data of the objectfuncMobInter_DataVob_GetMobInterData(varC_VobmobInter){};/// Sets the data of the oCMobInter object////// @param mobInter oCMobInter object/// @param data MobInter_Data of the objectfuncvoidVob_SetMobInterData(varC_VobmobInter,varC_MobInter_Datadata){};
C_MOBLOCKABLE_DATA
Represents data for the locked interactive object oCMobLockable
classC_MOBLOCKABLE_DATA{varintLocked;// whether the object is lockedvarintAutoOpen;// [UNUSED]varintPickLockNr;// current rotation number varstringKeyInstance;// key instance name for the objectvarstringPickLockStr;// combination to open the object ("LRRLR")};
/// Returns the data of the oCMobLockable object////// @param mobLock oCMobLockable object/// @param data MobInter_Data of the objectfuncC_MobLockable_DataVob_GetMobInterData(varC_VobmobLock){};/// Sets the data of the oCMobLockable object////// @param mobLock oCMobLockable object/// @param data C_MobLockable_Data of the objectfuncvoidVob_SetMobInterData(varC_VobmobLock,varC_MobLockable_Datadata){};