Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Or if you mean during gameplay... There is no direct way to edit that (or is there?) so replace the unit with a copy of it without a shadow.
Thats a pretty original idea, I will try that now. Get back to you after I have tested it. What model is the shadow and how do I access it?maybe you could have a dummy aura, which attachs a "shadow" model on origin, then remove/add the ability when you need to
// Credit to Deaod, edited by Maker
private function CreateUnitWithoutShadow takes player owner, integer uid, real facing, string shadowfile returns unit
local image i = CreateImage(shadowfile, 1, 1, 0, 0, 0, 0, 1, 1, 0, 3) // creates a dummy image
if GetHandleId(i) == -1 then // if the new shadow is invalid, abort, it can screw up the game
debug call BJDebugMsg("CreateUnitWithShadow: Invalid path for new shadow!") // it could also be caused by an imageType of 0, but thats a less common cause
return null // since the image is invalid, we dont need to destroy it
endif
call DestroyImage(i) // destroy the dummy.
set u = CreateUnit(owner, uid, CREATE_X, CREATE_Y, facing) // create the unit. this also creates a new image which functions as the shadow of the unit. The shadow will use the ID of the dummy image.
call DestroyImage(i) // destroy the shadow of the unit
call CreateImage(shadowfile, 1, 1, 0, 0, 0, 0, 1, 1, 0, 3) // this creates the new shadow for the unit, note that i dont need to overwrite "i" as the id this image will get is predictable
call SetImageRenderAlways(i, false) // Hides the shadow
call SetImageColor(i, 0, 0, 0, 0) // Makes the shadow invisible
// no need to null "i", as images dont use ref-counting
return u
endfunction
There is a very hacky way to hide a shadow of a unit via images.
It requires JASS script, though and also requires you to remove/recreate said unit to hide the shadow.
If you are interested, just search "hide unit shadows".
There is no shadow model. Shadows are images. This is why the above mentioned method works.I also would like to know what the shadow model is if anyone knows.
