Welcome, Guest! Log In | Create Account

Coming NsEditor V1.35

Support for using tools created for the APOCALYX Engine, such as NsEditor

Re: Coming NsEditor V1.35

Postby tetractys » Mon Jun 22, 2009 11:59 am

y_offs_et wrote:This exact same error appears after any of all of the four projects have crashed( well, doesn't display).
This is the error that displays when selecting the temporary.lua file with the Apocalyx runtime after a crash.

I (programmer of Apocalyx) don't know which is the problem. I received a copy of the NsEditor from Nout (the programmer of the NsEditor) six months ago and it worked quite fine. I don't know if Nout has changed something in the version that he personally provides on his site. You should ask him directly, because simply I don't know.
User avatar
tetractys
Site Admin
 
Posts: 53
Joined: Sat Sep 13, 2008 5:59 am
Location: Imperia, ITALY

Re: Coming NsEditor V1.35

Postby y_offs_et » Mon Jun 22, 2009 6:25 pm

Not to worry. The previously described fix was all that was needed.

tinyTutor - bugFix
Entity_Player.lua - lines 131 - 134 , there is a bug. It is not easily found with a text editor, but loading this file into the NsEditor, the colour syntaxing makes it visible.

Beta - bug complaint
It is most annoying when the property entity inspector auto selects the player1 entry after every trial. This is not fixable with Lua - it is a Dephi bug.
Last edited by y_offs_et on Thu Jul 02, 2009 5:44 am, edited 2 times in total.
y_offs_et
 
Posts: 7
Joined: Fri Jun 12, 2009 3:40 pm

Re: Coming NsEditor V1.35

Postby y_offs_et » Wed Jul 01, 2009 6:04 pm

I thought I would post some code fixes so a complete noob could get at least get their bearings with a minimal display. These are just pieces of the lua files. It's up to you to put or replace properly.

Code: Select all

GeneralRoutines.lua
.....................................................
-- my settings SF
--  local cx1,cy1,cz1 = cx,cy,cz
  FRW.EDT.Framework_EditorFrontVieW.X = cx
  FRW.EDT.Framework_EditorFrontVieW.Y = cy + 10
  FRW.EDT.Framework_EditorFrontVieW.Z = cz + 10
--  cx1,cy1,cz1 = cx,cy,cz
  FRW.EDT.Framework_EditorSideVieW.X = cx - 40
  FRW.EDT.Framework_EditorSideVieW.Y = cy + 10
  FRW.EDT.Framework_EditorSideVieW.Z = cz + 50
--  cx1,cy1,cz1 = cx,cy,cz
  FRW.EDT.Framework_EditorTopVieW.X = cx
  FRW.EDT.Framework_EditorTopVieW.Y = cy + 100
  FRW.EDT.Framework_EditorTopVieW.Z = cz + 50
  FRW.EDT.Framework_ForceSelect=false
......................................................



Entity_Player.lua

..............................................................................
function Class_Player:Update()
--    if (FRW.EDT.EditorActive~=true) and (FRW.DisableControlles==false) then
    if (FRW.DisableControlles==false) then
      local ElapsedTime = getTimeStep()
      local RotSpeed = ElapsedTime*(3.1415)
      if isKeyPressed(self.KeyRunning) and self.isToggleRun==0 then
        self.isToggleRun=1
        if self.MoveType=="Walk" then self.MoveType="Run"
        else self.MoveType="Walk"
        end
      else
        self.isToggleRun=0
      end
      if isKeyPressed (self.KeyJumpUp) then
        if self.isJump==0 then
            self.isJump=1
            self.Object:setAnimation(self.Pawn.AnimsRef["Jump"].Nr)
        end
      else
        if self.isJump==1
--        and self.Object:getStoppedAnimation()==self.Pawn.AnimsRef["Jump"].Nr
            then
            self.isJump=0
            self.isIdle=0
            self.isRun=0
        end
      end
      if isKeyPressed(self.KeyForward) or
         isKeyPressed(self.KeyBackward) or
         isKeyPressed(self.KeyLeft) or
         isKeyPressed(self.KeyRight) then --or
--        isKeyPressed(self.KeyJumpUp) then
        if self.isRun==0 then
          self.isIdle=0
          self.isRun=1
          self.Object:setAnimation(self.Pawn.AnimsRef[self.MoveType].Nr)
          if self.Sound~="" then FRW.PlaySound(self,255) end
        end
        if isKeyPressed(self.KeyLeft) then self.Object:rotStanding(RotSpeed) end
        if isKeyPressed(self.KeyRight) then self.Object:rotStanding(-RotSpeed) end

        self.moveSpeed = ElapsedTime*self.Pawn.AnimsRef[self.MoveType].Speed
        if self.Pawn.ModelType=="MDL" then self.Object:advanceFrame(ElapsedTime) end
        self.Collides = self:CheckCollision(self.moveSpeed)
      else
        self.isRun=0
      end

    end
    if self.isIdle==0 and self.isRun==0 then
      self.isIdle=1
      self.Object:setAnimation(self.Pawn.AnimsRef["Idle"].Nr)
    end
    if self.Collides==true and self.OnCollision~="" then dostring(self.OnCollision.."()") end
    if self.OnConversation~="" then dostring(self.OnConversation.."()") end
  end

................................................................................


Entity_Camera.lua
.............................................................

  function Class_Camera:Init()
    local cam = getCamera()
    local Cset = self.CameraSettings
    if cam then
      cam:reset()
      setAmbient(self.WorldAmbientR,self.WorldAmbientG,self.WorldAmbientB)
      setPerspective(self.FieldOfView,self.NearClip,self.FarClip)
      if self.EnableFog==true then
        enableFog(self.FogDistance,self.FogColorR,self.FogColorG,self.FogColorB)
      else
        disableFog()
      end
      if self.AttachTo==nil then
        print(self.EntityName..": ERROR: AttachTo returns nil!. Please check the assigned propoerty was declared BEFORE this entity")
        if NsEditor_ShowConsole==true then showConsole() else hideConsole() end
      elseif self.AttachTo~="" then
        self.Object = self.AttachTo.Object
--        if self.Object then
        if self.TagName~="" then
          self.linkReference = Reference()
          if self.Object:getLinkTransform(self.TagName,self.Trans)==true then
            FRW.Camera:set(self.Trans)
          else
            print(self.EntityName..": ERROR: LinkReference with TagName "..self.tagname.." not found !")
            if NsEditor_ShowConsole==true then showConsole() else hideConsole() end
          end
        else
            cam:set(self.Object)
            cam:move(Cset.PosX+self.OffsetX,Cset.PosY+self.OffsetY,Cset.PosZ+self.OffsetZ)
        end
--        end
      else
        print(self.EntityName..": ERROR: AttachTo has no object !")
        if NsEditor_ShowConsole==true then showConsole() else hideConsole() end
      end
      cam:setPosition(Cset.PosX-self.OffsetX,Cset.PosY+self.OffsetY,Cset.PosZ-self.OffsetZ)
      cam:setEulerAngles(self.CamPitch+self.Pitch,self.CamYaw+self.Yaw,self.CamRoll+self.Roll)
      FRW.Camera = cam
    else
      print(self.EntityName..": ERROR: No camera found!")
      if NsEditor_ShowConsole==true then showConsole() else hideConsole() end
    end
  end




There's too many possible code forks in the road, and no road map.
I'll come back when there is some more progress.
Last edited by y_offs_et on Sat Jul 04, 2009 10:42 pm, edited 1 time in total.
y_offs_et
 
Posts: 7
Joined: Fri Jun 12, 2009 3:40 pm

Re: Coming NsEditor V1.35

Postby tetractys » Thu Jul 02, 2009 1:27 pm

y_offs_et wrote:I thought I would post some code fixes so a complete noob could get at least get their bearings with a minimal display. These are just pieces of the lua files. It's up to you to put or replace properly.

Thank you very much!
User avatar
tetractys
Site Admin
 
Posts: 53
Joined: Sat Sep 13, 2008 5:59 am
Location: Imperia, ITALY

Previous

Return to Tools Support

Who is online

Users browsing this forum: No registered users and 1 guest

cron