Open adosikas opened 9 years ago
Probably something in the holoAnim function causing it.
One of these functions perhaps. https://github.com/wiremod/wire-extras/blob/master/lua/entities/gmod_wire_expression2/core/custom/holoanim.lua#L27
To properly work, the gesture functionality must be used instead.
http://wiki.garrysmod.com/page/Entity/AddGestureSequence http://wiki.garrysmod.com/page/Entity/AddGesture http://wiki.garrysmod.com/page/Entity/RestartGesture
Been working on this very briefly, but it seems that even with using AddGesture
/AddGestureSequence
poses still don't work as the gesture still overrides them.
I'm really not experienced much in GLua so I don't know if there's something that I've missed, but I get the nasty feeling that this is a limitation within Garry's Mod and the way it handles animations and poses rather than just using Gestures instead of Sequences.
Using AddGesture
instead of ResetSequence
yields the same results; the animation overrides the poses, regardless if the pose is set before, during or after the animation has played.
For reference, I modified lines 37-40 in the holoanim.lua as shown:
local gesture = Holo.ent:AddLayeredSequence(Animation, 1)
Holo.ent:SetLayerCycle(gesture, math.Clamp(Frame,0,1))
Holo.ent:SetLayerPlaybackRate(gesture, math.Clamp(Rate,0,12))
@thegrb93 You seem to be very knowledgeable in GLua - any ideas?
There's a glua addon for Tf2 turrets that I read the code from. I'd suggest looking at that to see how it's done.
I can't seem to find anything like that addon you mentioned despite a fair amount of digging - most addons I can find are just based off a generic standing turret NPC base and just have a remodel or visual change or whatever.
I had a quick look at Valve's own turret code, and whilst that is in CPP, the basic functionality is that it uses SetActivity
which handles all the animations and sequences for the base turret NPC, a function which naturally is only callable on NPCs, though internally it should use the same functions for playing sequences so I don't see how it shouldn't work the same
Enabling the fire animation not only flips the holo by 90 degrees, but also resets the facing set by holoSetPose, which makes it basicly pointless to use.
(This affects all 3 levels of the sentry, but not all animations) Is this something that can be fixed here, or is it how the model gets read by GMod? In TF2 it obviously works.