Chessnut / NutScript

A free role-play framework for Garry's Mod.
http://nutscript.rocks
MIT License
94 stars 77 forks source link

Animation Enums Strings #581

Closed Zenolisk closed 9 years ago

Zenolisk commented 9 years ago

The current animation system does not work with Strings.

Look at the Combine Soldier for example, when the hands are equipped it looks like it tries to switch between T-Pose and the Animation Sequence. (string)

Here's an example: http://arcticnexus.biz/shit/2.webm

Chessnut commented 9 years ago

What weapon are you using because it works fine for me:

http://i.imgur.com/PgjwcG8.png

Zenolisk commented 9 years ago

Default hands that come with Nutscript, I will try removing some things on my side and update NS once more.

Edit: I've switched the string with an Enum and it works perfectly, I have no clue what is causing this.

[ACT_MP_STAND_IDLE] = {"idle_unarmed", ACT_IDLE_ANGRY},

to

[ACT_MP_STAND_IDLE] = {ACT_IDLE, ACT_IDLE_ANGRY},

Worked for me, obviously these are two different animations but strings seem not to work for me.

Chessnut commented 9 years ago

Aren't you demonstrating the walking animation though?

Rubberbandits commented 9 years ago

strings work fine, you're attempting to use a sequence and not something that the engine deems as an act, i've had the same problem.

use GetSequenceActivityName to get the ACT_ enumeration from your sequence.

On Thu, Aug 13, 2015 at 10:08 PM, Brian notifications@github.com wrote:

Aren't you demonstrating the walking animation though?

— Reply to this email directly or view it on GitHub https://github.com/Chessnut/NutScript/issues/581#issuecomment-130967118.

Zenolisk commented 9 years ago

The thing I'm trying to say here is that in NS 1.0 for example it works fine with sequence strings such as "idle_unarmed" and now in NS 1.1 it doesn't work for some reason.

Edit: I also go into T-Pose when crouching down with a weapon (pistol) as a Citizen Character (male)

Chessnut commented 9 years ago

@Rubberbandits using GetSequenceActivity just makes the models stand still.

Rubberbandits commented 9 years ago

I've used it, and I still use it to this day. Translating your sequences into activities solves all of these problems. Use print(Entity(1):GetSequenceActivityName((Entity(1):LookupSequence("sequencename")))

Chessnut commented 9 years ago

Right, but using that activity in CalcMainActivity just results in a still animation.

Rubberbandits commented 9 years ago

Using it in an animtable works.

Chessnut commented 9 years ago

Whatever is in the animation table still ends up being used for CalcMainActivity.

Rubberbandits commented 9 years ago

Interesting, it all works fine for me.

On Sun, Aug 16, 2015 at 11:25 AM, Brian notifications@github.com wrote:

Whatever is in the animation table still ends up being used for CalcMainActivity.

— Reply to this email directly or view it on GitHub https://github.com/Chessnut/NutScript/issues/581#issuecomment-131598828.

Zenolisk commented 9 years ago

@Rubberbandits if I use your method to get the ACT_ from sequence strings it still goes into T-Pose, I've made a clean install of gmod and NS plus HL2RP schema, still the same result.

http://arcticnexus.biz/p/test3.webm

EDIT: It must be my client because other people do not have this problem, I will try to fix it somehow.