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

Morphing units

Status
Not open for further replies.

Ham

Ham

Level 5
Joined
Jan 16, 2009
Messages
132
hey there hive users, i am making a new revival/morphing system, but i can't figure out how to do it well with no leaks, what i am trying to do is the follow, when an unit's mana becomes greather than or equal to 1 it will make other unit morph using the old relatives mana from the unit that has mana equal or greather than, and also want to remove this unit (mana one) and just keep the morphed one.

example

mana unit = mana greather than or equal to 1
non-mana unit = morph into another unit three
unit three = keeps mana unit's mana
then remove mana unit
 
Level 35
Joined
Feb 5, 2009
Messages
4,561
Um... okay... no wonder you call this a challenge, I'm having difficulty understanding what you want to do :p.

From what I see, it looks as if you want it so that Unit A gets 1 mana, so Unit B turns into Unit C who has the same mana as Unit A. However, you want to remove unit A afterwards. Can't you just have it so that you replace Unit A with Unit C using Unit A's relative life and mana? Then, you instantly move Unit C to where Unit B is and then remove Unit B.

Hm... I think that will do the trick. If you need anymore explanation, I'll answer ASAP. However, it just sounds like a simple problem of thinking of the wrong method (this isn't a bad thing, as it trains you to think of alternative methods to accomplish what you want. Rarely is what you see in games that looks good what it actually is. Us modders are magicians: we create illusions). Good luck!
 

Ham

Ham

Level 5
Joined
Jan 16, 2009
Messages
132
  • Ressurect
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set HumanImpaled = (Units of type Human Impaled)
      • Unit Group - Pick every unit in HumanImpaled and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) is in DontAdd) Equal to False
            • Then - Actions
              • Unit Group - Add (Picked unit) to DontAdd
              • Trigger - Add to Ressurect2 <gen> the event (Unit - (Picked unit)'s mana becomes Greater than or equal to 1.00)
            • Else - Actions
      • Custom script: call DestroyGroup (udg_HumanImpaled)
  • Ressurect2
    • Events
    • Conditions
    • Actions
      • Set Mana = (Percentage mana of (Triggering unit))
      • Unit - Remove (Triggering unit) from the game
      • Set Ethereal = (Units of type Explorer (Ethereal))
      • Unit Group - Pick every unit in Ethereal and do (Actions)
        • Loop - Actions
          • Unit - Replace (Picked unit) with a Explorer (Corporeal) using The old unit's relative life and mana
          • Unit - Set mana of (Last replaced unit) to Mana%
      • Custom script: call DestroyGroup (udg_Ethereal)
so far it's all i've got, it's working for me now, but i am not so sure if this is leak free.
 
Status
Not open for further replies.
Top