Converting sequences to activities via lua

One of the biggest problems when making SNPCs is the fact that you are very limited if the model does not have correctly defined animations. I’ve always wanted to be able to make a system where SNPCs can play any sequence. In the VJ Base mod, there is a function that allows you to make SNPCs play sequences. However, this does not work correctly, most of the time the sequences do not even play.

Silverlan on the other hand, was able to perfect a function that allowed you to define ‘.ani’ files into sequences and make the game think they’re activities. However, according to him his code no longer works due to one of the older Garry’s Mod updates breaking his function.

With all this said, I was wondering if anyone could give me any leads or help in perfecting a sequence to activity code. This code would greatly help all SNPCs makers as this is one of the biggest predicaments we have ran into.

Keep in mind that not all sequences have activities tied to them.

That’s why I’ve been trying to make a function similar to that of silverlans that plays a sequence that has no activity tied to it. I use GetSequenceActivity for non defined actors

These are the only two.

You can’t “make them”.