• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Off-hand Attachment

Status
Not open for further replies.
Level 6
Joined
Apr 12, 2009
Messages
156
I'm attempting to have a fishing spell that, once cast, attaches a fishing rod model in the casting unit's off-hand. I don't want the rod to appear over the unit's weapon, but I don't know if it's possible to attach something specifically to a unit's off-hand, and I can't simply place the rod in one specific hand (left/right), because different units hold their weapons in different hands. Anyone know an efficient solution to this?
 
Nah, there is only this:

  • Trigger1
  • Events
    • Map Initialization
  • Conditions
  • Actions
    • ---Make a Unit-type variable, that will store every unit that has the left hand "taken"---
    • Set UnitTypes[1] = Footman
    • Set UnitTypes[2] = Paladin
    • Set UnitTypes[3] = Archmage
  • Trigger2
  • Events
    • Unit - A unit starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to X
  • Actions
    • For each (IntegerA) from 1 to 3, do (Actions)
      • Loop - Actions
        • If (All conditions are true) then do (Actions) else do (Actions)
          • If - Conditions
            • (Unit-type of (Triggering unit)) Equal to UnitTypes[(IntegerA)]
          • Then - Actions
            • Special Effect - Create a special effect at hand,right of (Triggering unit) using x.mdl
          • Else - Actions
 
Status
Not open for further replies.
Top