Exemple #1
0
        /// <summary>
        /// Set the provided object's position to the provided vector.
        /// </summary>
        /// <param name="obj"></param>
        /// <param name="pos"></param>
        public static void SetPosition(NWGameObject obj, Vector pos)
        {
            string sFunc = "SetPosition";

            NWNXCore.NWNX_PushArgumentFloat(NWNX_Object, sFunc, pos.X);
            NWNXCore.NWNX_PushArgumentFloat(NWNX_Object, sFunc, pos.Y);
            NWNXCore.NWNX_PushArgumentFloat(NWNX_Object, sFunc, pos.Z);
            NWNXCore.NWNX_PushArgumentObject(NWNX_Object, sFunc, obj);
            NWNXCore.NWNX_CallFunction(NWNX_Object, sFunc);
        }
Exemple #2
0
        /// <summary>
        /// Add or move obj to area at pos
        /// </summary>
        /// <param name="obj"></param>
        /// <param name="area"></param>
        /// <param name="pos"></param>
        public static void AddToArea(NWGameObject obj, NWGameObject area, Vector pos)
        {
            string sFunc = "AddToArea";

            NWNXCore.NWNX_PushArgumentFloat(NWNX_Object, sFunc, pos.Z);
            NWNXCore.NWNX_PushArgumentFloat(NWNX_Object, sFunc, pos.Y);
            NWNXCore.NWNX_PushArgumentFloat(NWNX_Object, sFunc, pos.X);
            NWNXCore.NWNX_PushArgumentObject(NWNX_Object, sFunc, area);
            NWNXCore.NWNX_PushArgumentObject(NWNX_Object, sFunc, obj);
            NWNXCore.NWNX_CallFunction(NWNX_Object, sFunc);
        }