❄️🎁⛄ The Winter Games Tournament is Live! 🎄🎅❄️
Jump to content

Error Lua Script code.


Go to solution Solved by Josh,

Recommended Posts

Posted
--Error here 
    function me:StartPlayer()
        if me.mesh == nil then 
            me.mesh = LoadModel(me.world,"Models/Developer/Generic/generic.mdl")
            me.mesh:SetPosition(0,0.15,0)

            me.collider = CreateCylinder(me.world, 0.3, 1.5, 16, 1, 1)
            me.collider:SetColor(1,0,0,0.1)
            me.collider:SetPosition(0,1.1,0)
            me.collider:SetMass(78)
            me.collider:SetCollisionType(COLLISIONTYPE_PLAYER,false) -- Close App.
            
        end 
    end 

function me:StartCamera()
        if me.camera == nil then 
            me.camera = CreateCamera(me.world)
            me.camera:SetDebugPhysicsMode(true) -- Error Here too.**
            me.camera:SetFov(75)
            me.pivotNeck = CreatePivot(me.world)
            me.camera:SetPosition(0, 0, -me.followdistance) -- Set initial position and eye height
            me.camera:SetRotation(0, 0, 0)
            me.pivotNeck:SetRotation(me.freelookrotation) -- Synchronize with freelook rotation
            me.camera:SetParent(me.pivotNeck, true)
        end
    end

 

I have error when using the commands in Lua script. 

me.collider:SetCollisionType(COLLISIONTYPE_PLAYER,false)

and me.camera:SetDebugPhysicsMode(true)

image.thumb.png.030fef2315d1880ef8d5401330523bc4.png

 

 

 

Astrocuco.thumb.png.c76e0fb3de2d6e437e7dca099625e11e.png

Murphy's Law: We don't fix bugs, we document them as features. – Murphy Games

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...