• SetSequence simply kills the model?
    2 replies, posted
Okay, I've got this in a SENT [code]AddCSLuaFile( "cl_init.lua" ) -- Make sure clientside AddCSLuaFile( "shared.lua" ) -- and shared scripts are sent. include('shared.lua') animlist={"throw1","standtocrouch","ShootSMG1ToCover_R","preSkewer","photo_react_startle"} ENT.AutomaticFrameAdvance = true function ENT:Initialize() self.Entity:SetModel("models/Humans/Group01/male_02.mdl") //self.Entity:Spawn() //self.Entity:SetModel("models/gman.mdl") self.Entity:PhysicsInit( SOLID_VPHYSICS ) -- Make us work with physics, self.Entity:SetMoveType( MOVETYPE_VPHYSICS ) -- after all, gmod is a physics self.Entity:SetSolid( SOLID_VPHYSICS ) -- Toolbox local phys = self.Entity:GetPhysicsObject() if (phys:IsValid()) then phys:Wake() end timer.Create(tostring(math.random()),0.1,1,function() local sequence = self:LookupSequence("photo_react_startle") self:SetSequence(sequence) self:SetPlaybackRate(2.0) end) //self.Entity:Fire("kill","",2) end function ENT:Use( activator, caller ) return end function ENT:Think() if not spawned then spawned=true end self:NextThink(CurTime()) return true end[/code] (The physics copypasta is simply to see if it's a physics issue) All I'm trying to do here is make the entity play an anim, however when SetSequence is called the model simply disappears into thin air, I've consulted the wiki to no avail. Help?
Use ResetSequence.
[QUOTE=Wizard of Ass;27538858]Use ResetSequence.[/QUOTE] Tried, (provided you meant replacing SetSequence with ResetSequence) it doesn't disappear, but the model refuses to move an iota.
Sorry, you need to Log In to post a reply to this thread.