• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Merging

Status
Not open for further replies.
Level 11
Joined
Jul 20, 2004
Messages
2,760
It's a little bit more complicated since you have to take in consideration far too many things. Like check if atleast three such units are selected, to assure that they are reunited and that the resulting unit appears after a number of seconds. I was thinking to make the archon system and perhaps I will do it.

~Daelin
 
What i did was to create a unit (summoned from a hero) with a skill called merging. Then, i tried to do it so that the only way the merging would be done was that for all the three of them had to be selected (only the three units had to be selected,not more, not less) and that they were close to the hero who summoned them. If only one of the units was selected and the Merging button pressed, a message would say that there aren't enought units or they are too far from the hero. But when i tried, nothing happened.

By the way, what are GUI leaks?
 
Level 11
Joined
Jul 20, 2004
Messages
2,760
Leaks do all the same thing, either in JASS or GUI: They are either variables or actions that consume memory and then remain there even if they've done their job. And slowly (or faster), your memory will deplete if the function is leaking.

A solution for this is to assure that once you've used any variable and you no longer need it, set its value to null. There are also several functions that leak but in GUI there's nothing you can do (atleast I never tried). I am afraid I cannot help you much about GUI leaks. When I started to learn about leaks I already knew JASS. But this is the concept of leak, no matter where you meet it.

~Daelin
 
Level 11
Joined
Jul 20, 2004
Messages
2,760
Not really... That's one thing to avoid PolarProjection and Position of Unit leaks. Everytime you use such a code use the RemoveLocation but it must be un JASS and I am afraid that the whole path for POlarProjection for example must be transfered in JASS. Eventually take a separate trigger, put the single action, convert in Custom Script and then copy-paste the PolarProjectionBJ with its parameters into the parameters of RemoveLocation().

By nullifying variables, I mean set variable = null. This doesn't work however for integers and reals. Use the GUI action if you work only with globals and you work in GUI. If you work in JASS and you work only with globals or mostly with globals... tsk tsk, learn to use locals. ;)

~Daelin
 
Level 4
Joined
Nov 3, 2004
Messages
79
I can you say how can you do this!

Take a Spell like roar and make a Trigger that detects 3 Units surround of the Type or Name or Something then Kill the Units with effects or Something then make at a Point what you want the New Unit be created and so can you merging :D
 
Level 7
Joined
May 16, 2004
Messages
355
Well if anyone is interested I created 2 seperatemorph types, one is just a simple one and the other works like starcraft. The units move to each other and then start morphing, if you cancel it you get back your two units. Once it finishes it will create a Dark Archon. Its in GUI but it still works fairly well.
 
I'm kind of lost.

I'm sorry Daelin, but i didn't understand most of what you explained about PolarProjection. In fact, i don't even know what's a polar projection. If ur refering to the Point with polar offset, then i know what it is, but i don't think you were speaking of that. Could you explain it a bit simplified coz i never used custom texts and i don't understand a thing to it.
 
Level 7
Joined
May 16, 2004
Messages
355
Well take a look at my 2nd generation morph spell. The base of it is mount hippogryph, and it creates a dummy unit. Once the dummy unit comes into existance it is killed through triggers and another unit is created. This one then upgrades itself to a different building, once it finishes the resulting building is killed and an archon is created, this allows for you also to cancel the morph and reclaim your two initial units. If you are cofused by what I mean then take a look at my map and look at the triggers.
 
Level 11
Joined
Jul 20, 2004
Messages
2,760
Spellweaver said:
I'm kind of lost.

I'm sorry Daelin, but i didn't understand most of what you explained about PolarProjection. In fact, i don't even know what's a polar projection. If ur refering to the Point with polar offset, then i know what it is, but i don't think you were speaking of that. Could you explain it a bit simplified coz i never used custom texts and i don't understand a thing to it.

Well yeah, it is custom text. But you just referred to a custom script as well. Anyway, the idea would be to simply use the action "set variable = null" once you no longer need your global variable. That's kinda all you can do in GUI to avoid leaks. Clear enough?

~Daelin
 
Status
Not open for further replies.
Top