• SWEP Gestures not visible to other players.
    8 replies, posted
I'm working on a melee base that has custom holdtypes and animations. The holdtypes work fine, but I am now having troubles with the gesture animations. While the gestures do play, they only show up for yourself and no one else. It was hard enough to get the gestures to work, and now I have no idea how to go about fixing this. There are gestures for the attack animation, block animation, and parry animation, but they only show if you are the one swinging the weapon. To everyone else, you're just standing still. For the attack gesture: local fireSeq = self.Owner:LookupSequence("a_spear_2h_attack") self.Owner:AddVCDSequenceToGestureSlot( GESTURE_SLOT_CUSTOM, fireSeq, 0, 1 );
must be only running on the client try this shared. if(SERVER)then local fireSeq = self.Owner:LookupSequence("a_spear_2h_attack") self.Owner:AddVCDSequenceToGestureSlot( GESTURE_SLOT_CUSTOM, fireSeq, 0, 1 ) end
It looks like it's expecting a number but is getting "fireSeq" instead Player/AddVCDSequenceToGestureSlot self.Owner:AddVCDSequenceToGestureSlot( number, number, number, boolean ); I could be wrong but it looks like you're trying to use functions where it's asking for values(numbers) and a value where it's asking for true or false
That was actually the first thing I did. For some reason it made it so the animation doesn't play at all, which I just shrugged off originally. Maybe that's something to go on I always thought that the number value could just be replaced with any variable. It still technically works, and I never had any luck with any of the other gesture related functions on the gmod wiki.
Entity:LookupSequence returns a number.
Wow thanks for clearing that up. Why does GESTURE_SLOT_CUSTOM work instead of 6 then?
Because GESTURE_SLOTs are enums.
Ah I see now I'm oblivious and missed that before
Turns out the gesture commands we were using don't automatically call on everyone's clients, so we had to make a new function that did. Everything works fine now.
Sorry, you need to Log In to post a reply to this thread.