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

fusion / merge units help

Status
Not open for further replies.
Level 5
Joined
Feb 16, 2005
Messages
103
I'm trying to make 2 of the same kind of summoned units w/temporary lives merge into a new summoned unit with a temporary lifespan as well. I've tried this using the "Mount Hippogryph" ability as a base, and it never seems to work. Any suggestions? Thanks in advance!
 
Level 13
Joined
Mar 4, 2009
Messages
1,156
you can use this trigger

  • unit spawns a summoned unit
    • Events
      • Unit - A unit Spawns a summoned unit
    • Conditions
  • (ability being cast) equal to (your ability)
    • Actions
      • Unit - Replace (Triggering unit) with a (Unit-type of (Triggering unit)) using The old unit's relative life and mana
there should be a spell that makes it as well
try human - water elemental


not sure did i understand it but you want summoned unit without life time,don´t you ?
 
Level 5
Joined
Feb 16, 2005
Messages
103
not at all lol, let me rephrase. what i want is this: i have 2 summoned units with timed lives, and i want them to merge (like high templars in SC) to form an entirely new unit (like an archon in SC). now i'd like this new unit to still be considered "summoned" and have a new limited lifespan, but it's an entirely different unit than the 2 that merge to form it.
 
Level 5
Joined
Feb 16, 2005
Messages
103
unfortunately the "mount hippogryph" ability doesn't seem to work on summoned units. and even so, when merging 2 of the same type of unit, basing this off of the "mount hippogryph" would require 2 buttons for virtually the same thing. any more thoughts?
 
Level 4
Joined
Jun 12, 2009
Messages
57
You can just do this. You can make the ability target the other summoned unit so it can do this instead

  • Event
    • Unit - Finishes casting a spell
  • Conditions
    • Casting spell equal to combine
  • Actions
    • Unit - Kill casting unit
    • Unit - Kill targeted unit
    • Unit - Create combined unit
I don't have world editor with me but that is close to how it is. You should be able to fill in the blanks
 
Level 5
Joined
Feb 16, 2005
Messages
103
there in lies the problem i keep having with this spell, kongfuman. it won't target the other unit, so i can't even get that far. is this problem i'm having because i'm merging 2 of the same unit (i.e. 2 dark templar) as opposed to merging 2 different kinds of units (i.e. an archer and a hippogryph)? and/or does the fact that the units are summoned creating the problem? i'm quite baffled...
 
Level 13
Joined
Mar 4, 2009
Messages
1,156
he problem is that i don't know how to make them come together...


but when your unit start to cast your ability you need to do something like this (with ordering them to come together would be better.....)


ser UNITGROUP = units owned by owner of unit (casting unit) matching condition (matching unit is selected by owner of unit (casting unit) and matching unit equal to unit of type (casting unit)


(you will maybe need to add - 0.25 here)
for each integer from 1 to (number of unit in UNITGROUP : 2) do actions
-kill Remove random unit from UNITGROUP

pick every unit in UNITGROUP and do actions
-replace picked unit with (your unit)
call DestroyGroup(udg_unitgroup)


and add some effects

unsolved - how to make them some together (il try to do it when il have WE)

you need to find action for most close uni and i can solve it
like when harvester comes to nearest town hall
 
Level 5
Joined
Feb 16, 2005
Messages
103
alright, but even when i try to make this out of the "old" mount hippogryph ability where you have to choose a target to merge with (which i would prefer to use over the "new" one that just makes a nearby partner merge), it won't even let me select my unit as a valid target. what's up with that?
 
Level 4
Joined
Jun 12, 2009
Messages
57
Then what you need to do is make two variables the targeted unit and the casting unit so it doesn't get confused. Technically with my trigger it doesn't matter what spell you are using as long as it will target that other unit and that it doesn't do anything else besides targeting that other unit then that should work if I am misunderstanding something please tell me.
 
Level 13
Joined
Mar 4, 2009
Messages
1,156
well its easy to do it if you have target unit of ability being cast,make it with small range so they come to each other

>unit is ordered targeting an object
>>issued order equal to (get order from issued order actions,if you spell is chain than it something like Orc - Chain Lightning))
>>(ordered unit) equal to (your unit)
-order (target unit of ability being cast) to move to (ordered unit)


-unit begins to cast (your ability)
kill casting unit
replace target unit of ability being cast with (your unit)

{EDIT}
well its easy to do it if you have target unit of ability being cast and make is with SMALL range (75-200) so they come to each other
lets say your unit calls BUSH and another is OBAMA xD

>unit is ordered targeting an object
>>issued order equal to (chainlightning))
>>unit of type (ordered unit) equal to (BUSH)
-order (target unit of ability being cast) to move to (ordered unit)


-unit begins to cast (your ability)
kill casting unit
replace target unit of ability being cast with (OBAMA)
Unit - Add a 30.00 second Generic expiration timer to (Last replaced unit)
 
Last edited by a moderator:
Level 2
Joined
Mar 13, 2008
Messages
24
Alright, the easiest way to do this is as follows.

1) Make a new skill, and base it off of banish. Call it "Merge" or "Fuse" or whatever.
2) Add it to your unit that you want to cast merge.
3) Create the Following trigger...

Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Modified Banish
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Unit-type of (Target unit of ability being cast)) Equal to Footman
Then - Actions
Unit - Create 1 Footman for (Owner of (Casting unit)) at (Position of (Casting unit)) facing Default building facing degrees
Unit - Remove (Casting unit) from the game
Unit - Remove (Target unit of ability being cast) from the game
Unit - Add a 30.00 second Generic expiration timer to (Last created unit)
Else - Actions
Game - Display to (All players controlled by a ((Owner of (Casting unit)) controller) player) the text: You must cast this ...

Hope this helps. ^^
 
Level 5
Joined
Feb 16, 2005
Messages
103
Thanks a ton, Enin +rep! Just a minor fix now: can anything be done to the Else - Actions to make it like a normal ability when you target the wrong unit, it doesn't actually cast the ability and waste the mana? Because right now it just casts the dummy Banish ability i have. Any thoughts there? Thanks again!
 
Level 13
Joined
Mar 4, 2009
Messages
1,156
Thanks a ton, Enin +rep! Just a minor fix now: can anything be done to the Else - Actions to make it like a normal ability when you target the wrong unit, it doesn't actually cast the ability and waste the mana? Because right now it just casts the dummy Banish ability i have. Any thoughts there? Thanks again!



firstly you should replace banish ability with chain lightning (targets 1)

>unit is ordered targeting a object
E-unit is ordered targeting an object
C-issued order equal to "chainlightning"
C-unit of type (ordered unit equal to (Your Unit) -your unit that cast your custom ability
C-target uni of issued order not equal to (Your Unit) -your unit that must be targeted
set YourVariableTypeUNIT = (ordered unit)
start YourVariableTypeTIMER that will expire in 0.00 seconds

(expiring timer is needed so your WarCraft cant crash...just do what i say xD)

>stop unit when timer expires
E-YourVariableTypeTIMER expires
order YourVariableTypeUNIT to "stop" -there you stop the ordered unit to cast your ability


on this way it will not happen when you start to cast ability,it will stop him immediately like the unit has magic immunity,on this way you can also stop units to PICK UP items,not drop them whey they pick it up
 
Level 2
Joined
Mar 13, 2008
Messages
24
Just an observation, but isn't it a little redundant to put a mana cost on a spell that removes the unit? X^P

And I agree with Alien about changing it to chain lightning. Now that I think about it, banish was a dumb spell to base it on... *self wrist slap*

But I think it would be easier to change the trigger to...

  • Events
    • Unit - A unit Begins the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Modified Chain Lightning
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Unit-type of (Target unit of ability being cast)) Equal to Footman
      • Then - Actions
        • Unit - Create 1 Footman for (Owner of (Casting unit)) at (Position of (Casting unit)) facing Default building facing degrees
        • Unit - Remove (Casting unit) from the game
        • Unit - Remove (Target unit of ability being cast) from the game
        • Unit - Add a 30.00 second Generic expiration timer to (Last created unit)
      • Else - Actions
        • Game - Display to (All players controlled by a ((Owner of (Casting unit)) controller) player) the text: You must cast this spell on "Name of Fusion Unit"
        • Unit - Order (casting unit) to (stop)
Hope this helps. ^^ (more than the last one)
 
Level 13
Joined
Mar 4, 2009
Messages
1,156
Did you check that it will stop the casting unit?,not sure about that

and you are leaking locations - position of casting unit
you can remove locations like this

-set YourVariabelTypePoint = (somewhere)
>use it as many times you want but don't change it until you do this custom script
-Custom script:call RmoveLocation(udg_NameOfYourVariabelTypePoint)

if name of your variable type point is POINT

-set POINT = (somewhere)
...
call RemoveLocation(udg_POINT)

whatever..........

there is no need to create a unit,just replace casting unit with the unit you wanted to create
 
Level 6
Joined
Nov 14, 2007
Messages
155
Unit - Remove (Casting Unit) from the game

my casting unit is a hero and whenever a hero dies it is revive in a region.

Action: Unit - Remove (Casting Unit) from the game; this action does not remove the unit instead, the unit is some sort of killed and then revived in the said region.

how can i make the casting unit gone permanently
 
Level 13
Joined
Mar 4, 2009
Messages
1,156
Unit - Remove (Casting Unit) from the game

my casting unit is a hero and whenever a hero dies it is revive in a region.

Action: Unit - Remove (Casting Unit) from the game; this action does not remove the unit instead, the unit is some sort of killed and then revived in the said region.

how can i make the casting unit gone permanently
you did something wrong....remove casting unit action removes unit permanently

post your trigger...
 
Level 9
Joined
Sep 5, 2015
Messages
369
trying to do this myself. it works but both units dont die. only the one that casts
the remove - targeted unit trigger doesnt work? lmao wtf am i doing wrong i swear it just worked the one time for no reason?
any help? lol

(just trying to have this ability merge 2 dont care about it permanently removing anything i dont have a revive mechanic going) thanks to anyone who might help


EDIT: I figured out what i need to do. i put (wait 0.50 seconds) inbetween all of the Then - Actions. it works but now it just looks like a chain lightning goes off, removes the targeted unit, then 1 sec later the casting unit disappears. just looks goofy but works lol...
EDIT: changed to 0.10 seconds and it's alot more smooth. imma stop here cuz its good enough for what i want but maybe even 0.05 would be better (altho i feel like this would complicate things if i were to try maybe not. give it a try if u want)
EDIT: also THANKS for this thread guys.
 
Last edited by a moderator:
Status
Not open for further replies.
Top