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

[Group Lab] Found anything interesting that can't be solved? Lets discuss it here!

Status
Not open for further replies.
So, you guys found anything interesting related to World Editor? Lets discuss it here.
Possibly we can found a solution!

The example is : ConvertAttackType(7)

Warning : Please, NO SPAMMING with useless comments, try to make this discussion healthy!

I hope this discussion can proof to be a very useful one
 
Basically, it's almost the same, except I exclude Prototype Resources from here, so this Lab doesn't then too messy.

And yeah, I love The Lab Forum as well.

EDIT :

Here's a nice topic to start with :
We all know that PauseUnit() is very annoying. We also know that we can use SetUnitPropWindow() instead, but there are several problem with PropWindow modify. So, what is the best solution to replace PauseUnit other than the PropWindow you guys can recommend for making spells?
 
Level 16
Joined
Jul 31, 2012
Messages
2,217
Well, even if you store the prop window of a unit, either when saving it or when re-seting it you have to change ONE AND ONLY ONE of them into RADIANS, info by PnF
Pause unit could be the best solution, if only it didn't pause the buffs :3
 
Hmmm.... What about using modified channel?
This one is quite bothering.
Pause unit could be the best solution, if only it didn't pause the buffs :3
I hope somebody for the least make something almost equal to that.

So we can have PauseUnit that doesn't actually pause everything.

Also, here's a discovery : some spells like Phoenix Fire also get stopped using PauseUnit.
 
Level 17
Joined
Apr 27, 2008
Messages
2,455
Wait wait wait, i remember something about a field for channel which can disable all unit's abilities (including the move ? 'Amov' and attack ? 'Aatk'), as a passive ability (no need to cast channel i mean, just add it to the unit) ?
Or if it doesn't disable these "hidden" abilities you can still remove them and then use a morph ability to give them back, but yeah that becomes tricky.
 
Level 22
Joined
Sep 24, 2005
Messages
4,821
You still have to order the unit to cast it, I think it's much cleaner than the morph thing but it sets the current order to the channel ability order you picked, so maybe if the unit gets stunned by another unit, the spell will end, so it's not as dependable as the morph one.

EDIT: I haven't tested this.
 
Level 16
Joined
Jul 31, 2012
Messages
2,217
I found something useful! And hilarius!
7894_700x.jpg
 
Level 17
Joined
Apr 27, 2008
Messages
2,455
Nope chobibo, i'm talking about adding channel as a passive not visible ability.
I'm sure there is an option for this ability which de-active unit abilities, but i don't remember if 'Aatk' and 'Amov' are handled.

And the morph part was beacuse once removed with UnitRemoveAbility you can't add again 'Aatk' and 'Amov'.
 
Level 22
Joined
Sep 24, 2005
Messages
4,821
I have tested it, an invisible channel casted through triggers, I used it on a request spell. I'll try uploading it later, I'm baby sitting right now.

EDIT: I wouldn't call it test though, since the guy is already using it in his map lol.
 
Level 18
Joined
Sep 14, 2012
Messages
3,413
Oh yeah Troll-Brain there :3
Maker told me to use this kind of thing to render the unit unable to take orders from the owner :
JASS:
    private function DisableControl takes unit u returns nothing
        call UnitAddAbility(u, 'Aloc')
        call UnitRemoveAbility(u, 'Aloc')
        if IsUnitType(u, UNIT_TYPE_HERO) then
            call UnitAddAbility(u,MORPH_ID)
            call IssueImmediateOrder(u, "metamorphosis")
            call UnitRemoveAbility(u,MORPH_ID)
        else
            call UnitAddAbility(u, BEAR_ID)
            call IssueImmediateOrder(u, "bearform")
            call UnitRemoveAbility(u, BEAR_ID)    
        endif
    endfunction

It is vJASS but just remove the private keyword and fix the globals....
 
Level 17
Joined
Apr 27, 2008
Messages
2,455
Playing with 'Aloc' should cause issues, about selection stuff, pathing and such.
But maybe there are none with morph abilities i don't know.

But still at very least the coder has to use UnitMakeAbilityPermanent for all unit's abilities (can't remember the function name and currently i'm too lazy to check common.j).
And what about buffs ?
 
Level 17
Joined
Apr 27, 2008
Messages
2,455
Well at very least i know that an unit will lost an ability if it's not permanent, but maybe abilities which are given to an unit through the object editor are already permanent.
And not the ones added by triggers.

Or maybe not after all, it's very old in my mind ...
 
Status
Not open for further replies.
Top