• 🏆 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!

Converting a unit?

Status
Not open for further replies.
Level 9
Joined
Aug 11, 2007
Messages
429
There is a "Packed up" version, [Mobile] and an "Unpacked" version [for attacking] of a unit I have called the Trebuchet.
When you go to "deploy" the trebuchet, after X seconds, it converts to an Unpacked version, is their a good way of doing this? Right now I just have "wait X seconds, replace unit with "trebuchet unpacked" but sometimes it doesn't work, and sometimes you spawn 2 trebuchets instead. So I could use some help/
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
this should do it (just tested it, it worked)

  • Trebuchet
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Unpack
    • Actions
      • Set TempGroup = (Units owned by (Owner of (Triggering unit)) matching ((((Matching unit) is loaded into (Triggering unit)) Equal to True) and ((Unit-type of (Matching unit)) Equal to Worker)))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in TempGroup) Equal to 4
        • Then - Actions
        • Else - Actions
          • Unit - Order (Triggering unit) to Stop
          • Unit - Order (Triggering unit) to Night Elf Druid Of The Claw - Night Elf Form
          • Unit - Order (Triggering unit) to Stop
      • Custom script: call DestroyGroup(udg_TempGroup)
(don't mind the stops at the end... it's needed).
Combine this trigger with the regular bear form (but uncheck the "uninterruptable").
 
Status
Not open for further replies.
Top