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

Unit replacing without order canceling

Status
Not open for further replies.
Level 9
Joined
Jun 26, 2007
Messages
659
  • Morph Alt Effect [COLOR="SeaGreen"](translation from french)[/COLOR]
    • Events
      • Unit - A unit Receive an order with a target point [COLOR="seagreen"](or a target unit, or no target, as you need)[/COLOR]
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to NormalUnit
      • (Issued order) Equal to (Order(WantedOrder))
    • Actions
      • Unit - Create 1 MorphedUnit for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing (Facing of (Triggering unit)) degrees
      • Unit - Order (Last created unit) to WantedOrder to (Target point of issued order) [COLOR="seagreen"](same order)[/COLOR]
      • Unit - Remove (Triggering unit) from the game
 
Last edited:
Level 6
Joined
Aug 19, 2006
Messages
187
yeah that is what i need - but it is possible to do this with another event?
because i wanted to do it with a trigger like this:

unit - a unit is attacked

unit type of attacked unit is unit x and unit x has y mana

is there a way how to do it with this event and conditions?
 
Level 9
Joined
Jun 26, 2007
Messages
659
I've some difficulty to understand
can you explain step by step what the game have to do?

I'll try...
Event :
- unit is attacked
Conditions :
- attacked unit type is the one which can morph
- attacked unit has enough mana to morph
Actions :
- attacked unit morphs
- attacked unit lost the mana cost
- attacking unit don't stop attacking

that's it?

if so, you probably need to explain what returns morphed unit to normal form to.
maybe time?
 
Last edited:
Level 6
Joined
Aug 19, 2006
Messages
187
ok i try to explain it.
the map is a tower defense map and im using a "if unit reaches a point order to next point system"
and i want to make a unit that has mana-reg and if it reaches full mana the unit will switch in an alternate form which is stronger than the old form.
but the problem is like i said that the units just stop after morphing.
 
Level 5
Joined
Sep 21, 2004
Messages
186
You have to use a manual trigger to tell them to move to the next point.

At the end of your morph trigger, add: Order "Last Created Unit" to "move" to (next waypoint).
 
Level 5
Joined
Sep 21, 2004
Messages
186
There is no way to store all orders that have been given to a unit and give them to a new unit. It would require you to set the units last given order to a variable everytime one is issued, and then reissue it. And might cause lag. But just my 2¢.
 
Level 9
Joined
Jun 26, 2007
Messages
659
you may add regions on all your paths
and add à list of if-then after the replacement :
- If (Last replaced unit is in region 0.1 or 0.2 or 0.3 ...) order it to move to region 1
- If (Last replaced unit is in region 1.1 or 1.2 or 1.3 ...) order it to move to region 2
- If (Last replaced unit is in region 2.1 or 2.2 or 2.3 ...) order it to move to region 3
etc etc

You can also use an effect instead of a morph, so you won't have to replace the unit

I've no more idea
and i think you are going to do a really hard work for a dispensable result
 
Last edited:
Level 3
Joined
Jul 2, 2006
Messages
35
My 2c

I'm sure that there are some skills which are designated to cast on self, and they don't stop orders, (i hope), maybe berserk is one, but if you put one of the triggers like, unit begins to cast a spell, spell = dummy spell, replace triggering unit with blah blah, at location X, or something like that
 
Level 5
Joined
Sep 21, 2004
Messages
186
You're both wrong. It is a non-targeted ability. It can be cast without interference with orders, but the problem is when you replace the casting unit. Since it is a new unit, it doesn't have the old units orders, so it has to be given new ones.
 
Status
Not open for further replies.
Top