AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   swimming animation (https://forums.alliedmods.net/showthread.php?t=216719)

.Dare Devil. 05-24-2013 18:10

swimming animation
 
Hi Allied Modders!

I have a fake water entity. All things like in water movement and effects are now done but now the swimming animation is missing and thats the hardest part.

I tried to set swimming animation sequence but engine just replace it with animation what should be by default. If player is in the air then your can see (like flash) tiny bit of water swimming animation ( i set animations in prethink ). Swimming animation wont stay.
With gaitsequence and if player is in the air then my animation wont get replaced ( because of engine update that gaitsequence slower i think ).

So my question is that is there some kind of way to bug somehow old "set animation" or if not then mayby somehow force water animaton ( let engine think that player is in the water, but i dont need fog effects and water movements, only the animation control )
And as always, thanks!

.Dare Devil. 05-24-2013 19:59

Re: swimming animation
 
Alright, It seems that the only way is creating fake entity with player model and then play costom animations.

Problem right now is that why pev_gaitsequence is not working?
It is working with player entity for sure...

hornet 05-25-2013 03:51

Re: swimming animation
 
Have you ever tried searching to solve your problems?

SetAnimation() needs to be hooked with Orpheu.
http://forums.alliedmods.net/showpos...6&postcount=27

a7811311622 05-25-2013 07:30

Re: swimming animation
 
Have you ever tried setting animations in postthink?

ConnorMcLeod 05-25-2013 07:41

Re: swimming animation
 
waterlevel is correctly set ?

hornet 05-25-2013 08:06

Re: swimming animation
 
Quote:

Originally Posted by ConnorMcLeod (Post 1958092)
waterlevel is correctly set ?

Wow your right. Didn't realise that waterlevel would have an effect on forcing the animation.
I take back what I said ;)

.Dare Devil. 05-25-2013 09:38

Re: swimming animation
 
Quote:

Originally Posted by hornet (Post 1957986)
Have you ever tried searching to solve your problems?

SetAnimation() needs to be hooked with Orpheu.
http://forums.alliedmods.net/showpos...6&postcount=27

Yes i did search but only on scripting forum, but omg this is very useful what i found out thanks for you.
Next time i know that miracles can also found in elsewhere.

Quote:

Originally Posted by a7811311622 (Post 1958083)
Have you ever tried setting animations in postthink?

I first tried in server frame, then i saw that animations works fine and after that i tried postthink.

Quote:

Originally Posted by ConnorMcLeod (Post 1958092)
waterlevel is correctly set ?

I did tried that but nothing changed. ( even tried to set flag FL_INWATER and FL_SWIM )
( I did this in prethink not postthink so mayby that was the problem )

Anyway, thank you so much guys!
There is 1 thing left: Why pev_gaitsequence wont work on entities?
Is there way to fix this?

For those who dont know: pev_gaitsequence is for blending 2 animations together, for example player is running and aiming&shooting or swimming and aiming&shooting
pev_sequence = running animation
pev_gaitsequence = shooting&aiming animation
( or invert, dont remember it exacly )

ConnorMcLeod 05-25-2013 10:12

Re: swimming animation
 
Joropito said if should work if your ent is created with hostage classname.

hornet 05-25-2013 10:16

Re: swimming animation
 
Quote:

Originally Posted by ConnorMcLeod (Post 1958181)
Joropito said if should work if your ent is created with hostage classname.

Well that's an interesting discovery. I'll have to try that sometime. You mean the water ent?

ConnorMcLeod 05-25-2013 10:22

Re: swimming animation
 
No, the player model entity on which gaitsequence has no effect.

You can also try to force ES_GaitSequence when that entity is passed in AddToFullPack, because there is a filter with player variable.


All times are GMT -4. The time now is 16:28.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.