Warcraft III resources & community, 2003–2006 · archived

Please help!

8 posts
#1

Please help!

I like to make a very complicated spell (to me), I called it "Fusion", my concept is:
-Target a non-hero friendly unit
-Search for a random friedly unit in 1000 AoE, and move it to the Target
-Create a new unit, removing the other 2, with 75% HP of the 1st target and 50% HP of the 2nd target.
-Create a floating text saying "FUSION!" (Done)

Help needed and welcome
#2
event, condition here...
action:
set FusionUnit[1] = spell target unit

there is a unitgroup action that picks a random unit (matching condition) in range of point.
->use that to pick the random unit
store it in a variable (FusionUnit[2])

move FusionUnit[2] to (position of FusionUnit[1])

set FusionHP[1] = life of FusionUnit[1] * 0.75
set FusionHP[2] = life of FusionUnit[2] * 0.5

remove FusionUnit[1]
remove FusionUnit[2]

create the new unit

and here is what i don't understand:
" with 75% HP of the 1st target and 50% HP of the 2nd target."

create the floating text...
#3
That's my problem, when I create a new unit. The spell is called Fusion, the concept is create a new unit having 75% HP of the FusionTarget[1] and 50% HP of the FusionTarget[2].Example:
-Footman (100 HP)
Fused with
-Sorceress (200 HP)
Results in
-Fusion (175 HP, having 75% HP of Footman, and 50% HP of sorceress)
#4
ahh, yes! understood. the anctient proble of setting the unit's max life/mana... well there is no way to set its life to a given value, exept this one by Blade.dk :

http://www.wc3jass.com/viewtopic.php?t=2652

download the map at the end of the comment!
it's some kind of bug (bless), i don't know.
if you don't want to use this, then there stays the horrible solution:
the fusion unit must have 99999 life initially, then set its current life to the given value... :?

no other suggestions.
#5
I will take the 2nd option, set 99999 as life and after that convert it. Thanks for help
#6
he means have

175/99999

life... take the first :wink:
#7
yeah, i recommend the first one. don't be afraid of that little JASS, once you copied it, you will only have to write a simple line of custom script.

the map has a full instruction inside. give it a try!
#8
The thing is that I don't know NOTHING of JASS, but I'll try. I was thinking in this: Create a fusion unit per each available combination (foot-treant, treant-druid,etc) calculating 75%/50% of each. A pack of fusion units.