This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Menu

Author Topic: Need help how to play an animation for GameObjects  (Read 3305 times)

ladiszlai

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 194
    • View Profile
Need help how to play an animation for GameObjects
« 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
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Kaev

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 308
    • View Profile
Re: Need help how to play an animation for GameObjects
« Reply #1 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.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

ladiszlai

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 194
    • View Profile
Re: Need help how to play an animation for GameObjects
« Reply #2 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?
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Kaev

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 308
    • View Profile
Re: Need help how to play an animation for GameObjects
« Reply #3 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
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

ladiszlai

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 194
    • View Profile
Re: Need help how to play an animation for GameObjects
« Reply #4 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
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

ladiszlai

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 194
    • View Profile
Re: Need help how to play an animation for GameObjects
« Reply #5 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 ?
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

saifi0102

  • Registred Member
  • LUA Script Tinker
  • *****
  • Posts: 42
    • View Profile
Re: Need help how to play an animation for GameObjects
« Reply #6 on: September 26, 2015, 05:01:39 pm »
Take a look at ObjectEffect.dbc
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

ladiszlai

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 194
    • View Profile
Re: Need help how to play an animation for GameObjects
« Reply #7 on: September 26, 2015, 08:09:39 pm »
Quote from: "saifi0102"
Take a look at ObjectEffect.dbc

This isn't it.
« Last Edit: September 26, 2015, 11:01:08 pm by Admin »

ladiszlai

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 194
    • View Profile
Re: Need help how to play an animation for GameObjects
« Reply #8 on: September 26, 2015, 11:00:47 pm »
So, No ideas ?
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Ascathos

  • Moderators
  • Creator of Worlds
  • *****
  • Posts: 1129
    • View Profile
Re: Need help how to play an animation for GameObjects
« Reply #9 on: September 27, 2015, 04:24:33 am »
Should be HandleGameObjectSetStateCommand, State 4 (as source displays)
Test that.

gobject set state (...) 4
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

ladiszlai

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 194
    • View Profile
Re: Need help how to play an animation for GameObjects
« Reply #10 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.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

saifi0102

  • Registred Member
  • LUA Script Tinker
  • *****
  • Posts: 42
    • View Profile
Re: Need help how to play an animation for GameObjects
« Reply #11 on: September 27, 2015, 03:31:54 pm »
Check AnimationData.dbc, there is an entry with name "CustomSpell01" with ID 213... Try that maybe
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

ladiszlai

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 194
    • View Profile
Re: Need help how to play an animation for GameObjects
« Reply #12 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.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

ladiszlai

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 194
    • View Profile
Re: Need help how to play an animation for GameObjects
« Reply #13 on: September 27, 2015, 08:35:02 pm »
So it is inpossible to play anims for objects.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

saifi0102

  • Registred Member
  • LUA Script Tinker
  • *****
  • Posts: 42
    • View Profile
Re: Need help how to play an animation for GameObjects
« Reply #14 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
« Last Edit: January 01, 1970, 01:00:00 am by Admin »