Modcraft - The community dedicated to quality WoW modding!

Wrath of the Lich King Modding => Serverside Modding => Topic started by: ladiszlai on March 11, 2015, 07:39:30 pm

Title: Need help how to play an animation for GameObjects
Post by: ladiszlai on March 11, 2015, 07:39:30 pm
Hi

I need help, how to play a GameObject animation? (I found some aanimations for a gobject in wowmodelviewer)

I tryed with the emotes but it doesnt work for me(only works for NPC)



Any body have got some idea?

Thanks
Title: Re: Need help how to play an animation for GameObjects
Post by: Kaev on March 12, 2015, 07:58:44 am
Quote from: "ladiszlai"
Hi

I need help, how to play a GameObject animation? (I found some aanimations for a gobject in wowmodelviewer)

I tryed with the emotes but it doesnt work for me(only works for NPC)



Any body have got some idea?

Thanks

Afaik gameobjects have states, which you can set. If you set it to the correct state, it will play the animation.
Title: Re: Need help how to play an animation for GameObjects
Post by: ladiszlai on March 20, 2015, 03:36:55 pm
Quote from: "Kaev"
Quote from: "ladiszlai"
Hi

I need help, how to play a GameObject animation? (I found some aanimations for a gobject in wowmodelviewer)

I tryed with the emotes but it doesnt work for me(only works for NPC)



Any body have got some idea?

Thanks

Afaik gameobjects have states, which you can set. If you set it to the correct state, it will play the animation.

Thanks for the answer but how can i set the states?
Title: Re: Need help how to play an animation for GameObjects
Post by: Kaev on March 25, 2015, 07:45:25 am
Quote from: "ladiszlai"
Quote from: "Kaev"
Quote from: "ladiszlai"
Hi

I need help, how to play a GameObject animation? (I found some aanimations for a gobject in wowmodelviewer)

I tryed with the emotes but it doesnt work for me(only works for NPC)



Any body have got some idea?

Thanks

Afaik gameobjects have states, which you can set. If you set it to the correct state, it will play the animation.

Thanks for the answer but how can i set the states?

Depends on how you want to do it. Do you want to do it in a script?
Check the code of the ".gobject set state" command: https://github.com/TrinityCore/TrinityCore/blob/3.3.5/src/server/scripts/Commands/cs_gobject.cpp#L631
Title: Re: Need help how to play an animation for GameObjects
Post by: ladiszlai on March 25, 2015, 06:02:43 pm
Quote from: "Kaev"
Quote from: "ladiszlai"
Quote from: "Kaev"
Quote from: "ladiszlai"
Hi

I need help, how to play a GameObject animation? (I found some aanimations for a gobject in wowmodelviewer)

I tryed with the emotes but it doesnt work for me(only works for NPC)



Any body have got some idea?

Thanks

Afaik gameobjects have states, which you can set. If you set it to the correct state, it will play the animation.

Thanks for the answer but how can i set the states?

Depends on how you want to do it. Do you want to do it in a script?
Check the code of the ".gobject set state" command: https://github.com/TrinityCore/TrinityCore/blob/3.3.5/src/server/scripts/Commands/cs_gobject.cpp#L631

Thank you
Title: Re: Need help how to play an animation for GameObjects
Post by: ladiszlai on September 26, 2015, 02:04:45 pm
I am here again with this topic for help.

If I have a gameobject with Animation  called "CustomSpell01"  what is the correct number for the "state"  ? (To play Ingame)   Anybody know ?
Title: Re: Need help how to play an animation for GameObjects
Post by: saifi0102 on September 26, 2015, 05:01:39 pm
Take a look at ObjectEffect.dbc
Title: Re: Need help how to play an animation for GameObjects
Post by: ladiszlai on September 26, 2015, 08:09:39 pm
Quote from: "saifi0102"
Take a look at ObjectEffect.dbc

This isn't it.
Title: Re: Need help how to play an animation for GameObjects
Post by: ladiszlai on September 26, 2015, 11:00:47 pm
So, No ideas ?
Title: Re: Need help how to play an animation for GameObjects
Post by: Ascathos on September 27, 2015, 04:24:33 am
Should be HandleGameObjectSetStateCommand, State 4 (as source displays)
Test that.

gobject set state (...) 4
Title: Re: Need help how to play an animation for GameObjects
Post by: ladiszlai on September 27, 2015, 08:35:46 am
Quote from: "Ascathos"
Should be HandleGameObjectSetStateCommand, State 4 (as source displays)
Test that.

gobject set state (...) 4

When i set the object state to 4 , my object don't play the Anim.

Have you got any idea ? I really need for this.
Title: Re: Need help how to play an animation for GameObjects
Post by: saifi0102 on September 27, 2015, 03:31:54 pm
Check AnimationData.dbc, there is an entry with name "CustomSpell01" with ID 213... Try that maybe
Title: Re: Need help how to play an animation for GameObjects
Post by: ladiszlai on September 27, 2015, 04:58:04 pm
Quote from: "saifi0102"
Check AnimationData.dbc, there is an entry with name "CustomSpell01" with ID 213... Try that maybe

I tryed this before ,but this not working.
Title: Re: Need help how to play an animation for GameObjects
Post by: ladiszlai on September 27, 2015, 08:35:02 pm
So it is inpossible to play anims for objects.
Title: Re: Need help how to play an animation for GameObjects
Post by: saifi0102 on September 27, 2015, 08:45:50 pm
Did u try .gob set state #guid 4 213

Where the 4 tells trinity to send SMSG_GAMEOBJECT_CUSTOM_ANIM packet
Title: Re: Need help how to play an animation for GameObjects
Post by: ladiszlai on September 28, 2015, 03:54:12 pm
Quote from: "saifi0102"
Did u try .gob set state #guid 4 213

Where the 4 tells trinity to send SMSG_GAMEOBJECT_CUSTOM_ANIM packet

Yeah I tryed but didn't worked. (thank you for trying to help me)