• 💀 Happy Halloween! 💀 It's time to vote for the best terrain! Check out the entries to Hive's HD Terrain Contest #2 - Vampire Folklore.❗️Poll closes on November 14, 2023. 🔗Click here to cast your vote!
  • 🏆 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!
  • 🏆 HD Level Design Contest #1 is OPEN! Contestants must create a maze with at least one entry point, and at least one exit point. The map should be made in HD mode, and should not be openable in SD. Only custom models from Hive's HD model and texture sections are allowed. The only exceptions are DNC models and omnilights. This is mainly a visual and design oriented contest, not technical. The UI and video walkthrough rules are there to give everyone an equal shot at victory by standardizing how viewers see the terrain. 🔗Click here to enter!

Resource tradeability and alternative attack animation

Status
Not open for further replies.

Bannar

Code Reviewer
Level 26
Joined
Mar 19, 2008
Messages
3,140
1. You might archieve that by setting aspect of alliance, for example to make given couple treat each other as Neutral.

2. Forces you to either remove attack command from unit or edit all the models yourself. War3 engine plays by default animation with string 'attack' as attack animation and the one with name 'death' as death animation. All you have to do is replace names for given Sequences.

However, if you want to do that for many models, it would require ton of imports and usually isn't worth it. There is no easier way unfortunately.
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
1. Try setting Ally - Trading incements in gameplay constant to 0.

2.
  • Untitled Trigger 024
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacking unit)) Equal to (==) Footman
    • Actions
      • Unit Group - Add (Attacking unit) to group
      • Countdown Timer - Start timer as a One-shot timer that will expire in 0.00 seconds
  • Untitled Trigger 025
    • Events
      • Time - timer expires
    • Conditions
    • Actions
      • Unit Group - Pick every unit in group and do (Actions)
        • Loop - Actions
          • Unit Group - Remove (Picked unit) from group
          • Custom script: call SetUnitAnimationByIndex(GetEnumUnit(), 9)
Find animation index:
  • Animations
    • Events
      • Player - Player 1 (Red) types a chat message containing an as An exact match
      • Player - Player 1 (Red) Selects a unit
    • Conditions
    • Actions
      • Set Hero = Footman 0031 <gen>
        • Do Multiple ActionsFor each (Integer i) from 1 to 20, do (Actions)
          • Loop - Actions
            • Custom script: call SetUnitAnimationByIndex( udg_Hero , udg_i)
            • Floating Text - Create floating text that reads (String(i)) above Hero with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
            • Floating Text - Change (Last created floating text): Disable permanence
            • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
            • Wait 2.00 seconds
For multiple unit types, you can initialize the animation index into a hashtable and the load the correct index using the unit type id.
 
Status
Not open for further replies.
Top