- Joined
- Jun 12, 2010
- Messages
- 413
So, I was trying to remove locust in-game seamlessly (click and drag select) for my RP map, so I decided to play around with Crow Form.
I thought I had everything figured out, but then my units started getting the attack type of the crow form unit, instead of their own attack type. Apparently, this is caused by the removal of the Crow Form ability in the function "Detect Morph".
Basically, the unit will inherit the following 3 stats from the crow form alternate unit:
-Damage and Attack-Type and Range (not missle art, but weapon type is inherited)
-Movement Speed (not type, unfortunately)
-Flying Height
-The unit facing angle also changes, and orders are interrupted.
You have to remove the Crow Form ability in the same thread as the one in which the "unravenform" order was issued. Otherwise, the unit will not inherit the stats.
This bug is not very useful to me, so I don't intend on checking it out any further. But I couldn't find anything about it on the internet, thus I decided to post it here, to see if anyone knew about it. Hopefully it can be useful to anyone who stumbles upon this, even though the trick is pretty limited.
Just type "fix" on the chat in map I've attached while selecting a unit(s) to use the trick on it. Sorry about the map being a mess, I was testing out other stuff in it.
EDIT: Actually, this also has something to do with DetectMorph running twice (once for the first transformation and a second time for the second one)
I thought I had everything figured out, but then my units started getting the attack type of the crow form unit, instead of their own attack type. Apparently, this is caused by the removal of the Crow Form ability in the function "Detect Morph".
JASS:
function DetectMorph takes nothing returns nothing
local unit whichUnit = GetTriggerUnit()
call SetUnitPosition(whichUnit, GetUnitX(whichUnit), GetUnitY(whichUnit)) //Allows order to be issued below
call IssueImmediateOrder(whichUnit, "unravenform") //Only works after moving the unit
call UnitRemoveAbility(whichUnit, 'Amrf') //This causes the bug
call DestroyTrigger(GetTriggeringTrigger())
endfunction
function MakeUnitSelectable takes unit whichUnit returns nothing
local integer unitId = GetHandleId(whichUnit)
local integer selectionType = 0
local trigger morphDetect
if selectionType == 0 then
set morphDetect = CreateTrigger()
call TriggerRegisterUnitLifeEvent( morphDetect, whichUnit, LESS_THAN, GetUnitState(whichUnit, UNIT_STATE_LIFE))
call TriggerAddAction(morphDetect, function DetectMorph)
call UnitAddAbility(whichUnit, 'Amrf')
call UnitMakeAbilityPermanent(whichUnit, true, 'Amrf')
call IssueImmediateOrder(whichUnit, "ravenform")
endif
endfunction
Basically, the unit will inherit the following 3 stats from the crow form alternate unit:
-Damage and Attack-Type and Range (not missle art, but weapon type is inherited)
-Movement Speed (not type, unfortunately)
-Flying Height
-The unit facing angle also changes, and orders are interrupted.
You have to remove the Crow Form ability in the same thread as the one in which the "unravenform" order was issued. Otherwise, the unit will not inherit the stats.
This bug is not very useful to me, so I don't intend on checking it out any further. But I couldn't find anything about it on the internet, thus I decided to post it here, to see if anyone knew about it. Hopefully it can be useful to anyone who stumbles upon this, even though the trick is pretty limited.
Just type "fix" on the chat in map I've attached while selecting a unit(s) to use the trick on it. Sorry about the map being a mess, I was testing out other stuff in it.
Attachments
Last edited: