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

Need help to create a "magic box"

Status
Not open for further replies.
Level 10
Joined
Nov 5, 2008
Messages
536
How do I do to get a "magic box" to work?

It is a building that has cargo hold. A specifik unit can be loaded into the box. The box has an ability call "Transform" or "Tada!" or something, and when the ability is activated the loaded unit is unloaded and replaced with a new unit.
I would like to base this ability on Battle Stations.

Kinda like a rabbit enters a magic hat and a bird comes out instead and the rabbit is gone. o_O

How do I do to create such epic magic?
 
Level 22
Joined
Feb 4, 2005
Messages
3,971
  • Crossed out to prevent confusion, see below
Use a dummy ability like a Berserk with all stats like speed increase,rtc set to 0 for the Transform.

Ok some things really depend on your map. Decide how many units you will use, what animals, etc. Coz then we would need to add conditions for more than 1 unit or more than 1 type, This is just in case you use only 1 unit to another.

So make sure your Box has battle stations (note: it allows you only 1 type of unit to be picked in the box). Add the transform ability to the box from the Object editor.
 
Last edited:
Level 10
Joined
Nov 5, 2008
Messages
536
  • Magic
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Transform
      • ((Random unit from (Units of type Rabbit)) is loaded into (Random unit from (Units of type Orc Burrow))) Equal to True
    • Actions
      • Unit - Order (Casting unit) to Orc Burrow - Stand Down
      • Unit - Hide (Random unit from (Units of type Rabbit))
      • Unit - Create 1 Chicken for (Owner of (Random unit from (Units of type Rabbit))) at (Position of (Random unit from (Units of type Rabbit))) facing Default building facing degrees
Use a dummy ability like a Berserk with all stats like speed increase,rtc set to 0 for the Transform.

Ok some things really depend on your map. Decide how many units you will use, what animals, etc. Coz then we would need to add conditions for more than 1 unit or more than 1 type, This is just in case you use only 1 unit to another.

So make sure your Box has battle stations (note: it allows you only 1 type of unit to be picked in the box). Add the transform ability to the box from the Object editor.

Thanks! How do I do to get the loaded Rabbit to be removed from the game and replaced with the chicken? Cause right now is it only hidden
 
Level 22
Joined
Feb 4, 2005
Messages
3,971
mark Solved.

So here are the started-over, much simpler triggers:

  • Magic
    • Events
      • Unit - A unit Is loaded into a transport
    • Conditions
      • (Unit-type of (Transporting unit)) Equal to Magic Vault
    • Actions
      • Unit - Set the custom value of (Loading unit) to 1

  • Magic 2
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units of type Rabbit) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Custom value of (Picked unit)) Equal to 1
              • ((Picked unit) is loaded into (Random unit from (Units of type Magic Vault))) Equal to False
            • Then - Actions
              • Unit - Remove (Picked unit) from the game
              • Unit - Create 1 Chicken for (Owner of (Picked unit)) at (Position of (Picked unit)) facing Default building facing degrees
            • Else - Actions
Things you need: The building/Box to have: Load ability (Orc Burrow- Rabbit as a unit), Cargo Hold, Stand Down is fine (better than Unload).

I don't recommend Battle Stations for the bugs it may cause.

You can make events that cause a group of units to move to the Box when having Load ability and as I said, only the units that enter inside will be converted, those outside won't (unlike battlestations). This can serve as the command all to go in the box. Trigger for that:

  • Unit Group - Pick every unit in (Units of type Rabbit) and do (Unit - Order (Picked unit) to Board (Random unit from (Units of type Magic Vault)))

Hope all bugs are fixed with Load.
 
Last edited:
Status
Not open for further replies.
Top