• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Model Theory question

Status
Not open for further replies.
Level 5
Joined
Aug 25, 2007
Messages
44
I want to make a base model that can switch out various weapon types. I'm sure it's been done many times before. I was wondering though, if I had various gun types, and each had a different look to the firing mechanism (shells and bullets, lasers, whatever) then could the gun attachment model have the attack animations in it and on attack a trigger would run the attached model's attack - 1 animation.

OR

would it be better to plan ahead and do all the different animation types to the model itself, and then trigger certain attack animations with a boolean comparing the currently attached gun to which animation is used?

What are your thoughts/tips/experiences?
 
Make the unit model have a separate animation for each attack type and use animation tags when certain weapons are equipped.

Animation name examples:
Attack ( -> attacks with first weapon)
Attack Upgrade First (-> attacks with second weapon)
Attack Upgrade Second (-> attacks with third weapon)
Attack Upgrade Third (-> attacks with fourth weapon)
etc..

When the unit acquires a weapon, you simply add the required animation tag with triggers.
For example add the "Upgrade Second" tag when third weapon is equipped.
The tag causes the model to only use the certain attack animation at all times until the tag is removed.

Don't forget to remove the tags when the weapon is unequipped.
 
Level 5
Joined
Aug 25, 2007
Messages
44
Thanks for the replies and ideas everybody. I was aware of tags, but wasn't sure which way best to use them. I think I have a better idea now so I'll do a few tests and post back when I've got something to show.

Edit: If that death animation works that would be the slickest, as no triggering and extra (for basically the same gun type) animation would be necessary either.
 
Depending on where you attach the model, the attachment's death animation will play when the unit attacks. This works for the hand that the unit attacks with, but I'm not sure what else. Just thought I'd add that.
The attachments death animation plays during the unit's attack animations if you attach the model by using the "Sphere" ability.
If you attach by using a dummy aura or a trigger, the attachment will not play the death animation.
 
Level 5
Joined
Aug 25, 2007
Messages
44
Massive Edit: Ok got it imported on sphere ability, and it does play death animation on attack, BUT when you stop attacking the animation keeps going. I tried on melee and ranged units. Any ideas?
 
Last edited:
Level 5
Joined
Aug 25, 2007
Messages
44
Edit: Isn't it always the way. I realized I didn't give my test attachment a nonlooping flag, so done and it works just great.
Now there is one more sticking point. When dropping the item, the death animation plays. That seems pretty hard coded I'm thinking though.. Anybody know if I can disable that?




Still looking for some help here.

shaman: I tested attaching to the nether drake like you said, but it still does the stand animation until attacking, then on attack it uses death animation and never reverts back to stand.
 
Last edited:
Kita, it works for some units if you attach it to the hand that they attack with. I haven't tested it on all the models yet. I know it works for the nether drake, but I doubt thats what you need.
Hmmh interesting...
Edit: Isn't it always the way. I realized I didn't give my test attachment a nonlooping flag, so done and it works just great.
Now there is one more sticking point. When dropping the item, the death animation plays. That seems pretty hard coded I'm thinking though.. Anybody know if I can disable that?
Did you give the sphere ability to the unit directly or did you have it as an item ability?

If I remember correctly the attachment should instantly disappear if you use "sphere" as an item ability and the item is removed from inventory.
 
Level 5
Joined
Aug 25, 2007
Messages
44
Here's a pic of my object editor. I have a custom sphere ability attached to an item with custom outlook.
 

Attachments

  • spherebazooka.png
    spherebazooka.png
    297.7 KB · Views: 77
Status
Not open for further replies.
Top