***UPDATE AS OF 7-24-17:
The issue has been isolated to being a modelling issue so I’ve made a new thread over there.
Incase someone from the future is having the same issue and needs an answer, hopefully it will be in the new thread here:
http://forum.facepunch.com/showthread.php?t=1572529&p=52503561#post52503561***
First off, I’m not sure where to put this thread so move it if needed.
This deals with both LUA and 3d Modelling in Blender.
Issue: SetSequence is not playing the sequence created in the .qc file.
Situation History:
Made a simple 3d object in Blender.
Created 4 objects.
myladder
myladder_idle
myladder_add
myladder_phys
The myladder_add sequence is not playing when called upon.
Everything is all exported and ready to go. The model is working in-game, but when self:SetSequence is called it doesn’t change to the myladder_add animation (or the “add” sequence).
QC File Code:
$modelname "main\props\myladder\myladder.mdl"
$scale 1
$body 1 "myladder.smd"
$cdmaterials "main\props\myladder\"
$surfaceprop "metal"
$contents "solid" "ladder"
$sequence "idle" "anims\myladder_idle.smd" {
fps 1
}
$sequence "add" "anims\myladder_add.smd" {
fps 5
}
$collisionmodel "myladder_phys.smd" {
$automass
$inertia 1
$damping 0
$rotdamping 0
$concave
}
Init.lua code for the entity
AddCSLuaFile("cl_init.lua")
AddCSLuaFile("shared.lua")
include("shared.lua")
function ENT:Initialize()
self:SetModel("models/main/props/myladder/myladder.mdl")
self:PhysicsInit(SOLID_VPHYSICS)
self:SetMoveType(MOVETYPE_VPHYSICS)
local physobj = self:GetPhysicsObject()
if physobj and physobj:IsValid() then physobj:Wake() end
self:Activate()
end
function ENT:Use( activator, caller )
local sequence = self:LookupSequence( "add" )
self:SetSequence( sequence )
end
Project Files (Blender file, compiled and raw files, entity lua files)
I am interested in your input. For those of you who may ask:
No, there is no texture yet.
This is a proof of concept.
I know there are other ladders out there, but I need to make my own for my project.
I am asking for assistance, not a critique on my code/modelling skills. Thank you.
UPDATE:
This is how you can test it yourself incase you didn’t know.
Copy the contents of “CROWBAR COMPILED” in “models/main/props/myladder”
Copy the contents of “garrys mod addon” into "lua/entities"