Piggy3590 / PiggysVarietyMod

1 stars 2 forks source link

Use animator only when necessary #26

Closed Test-Account666 closed 3 months ago

Test-Account666 commented 4 months ago

I didn't delete your previous code, but commented it, so you still have to do that

Piggy3590 commented 4 months ago

There's a some problem:

  1. There is no method called Dictionary.Get (iirc). This part can be solved with Dictionary[Key]
  2. Parameters are reset when animator controller has changed. For example, if you pick up a revolver while crouch, it will automatically stand up.
Test-Account666 commented 4 months ago

There's a some problem:

1. There is no method called `Dictionary.Get`. This part can be solved with `Dictionary[Key]`

The Get method is part of Unity's DictionaryExtensions. I never noticed that tbh... Using the square brackets is just counter-intuitive for me, so I never did that.

2. Parameters are reset when animator controller has changed. For example, if you pick up a revolver while crouch, it will automatically stand up.

Well, that makes sense... But I'd say that's better than breaking compatibility with other mods. At least until we figure out a good way to fix this

Piggy3590 commented 4 months ago

You can use the method of saving and applying parameters, but it seems to be very hardcoded