• 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.

Shadow Texture Path

Status
Not open for further replies.
Level 5
Joined
Nov 30, 2012
Messages
200
Sometimes I don't want shadows on items when they're actual objects such as a baseball bat on the ground. It just looks ugly. I unfortunately don't know how to remove the shadows.
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
JASS:
function CreateItemWithoutShadow takes integer iid, real x, real y, string shadowfile returns item
    local image i=CreateImage(shadowfile, 64, 64, 0, 0,0,0,64,64,0, 3)
    if GetHandleId(i)==-1 then
        debug call BJDebugMsg("CreateUnitWithShadow: Invalid path for new shadow!")
        return null
    endif
    call DestroyImage(i)
    set bj_lastCreatedItem = CreateItem(iid, x, y)
    call DestroyImage(i)
    return bj_lastCreatedItem
endfunction

function Trig_Untitled_Trigger_077_Actions takes nothing returns nothing
    call CreateItemWithoutShadow('ratc', -400, -1000, "ReplaceableTextures\\CommandButtons\\BTNMortarTeam.blp")
endfunction

//===========================================================================
function InitTrig_Untitled_Trigger_077 takes nothing returns nothing
    set gg_trg_Untitled_Trigger_077 = CreateTrigger(  )
    call TriggerRegisterPlayerEventEndCinematic( gg_trg_Untitled_Trigger_077, Player(0) )
    call TriggerAddAction( gg_trg_Untitled_Trigger_077, function Trig_Untitled_Trigger_077_Actions )
endfunction

Credit to Deaod for discovering this.
 
Thanks mate! I implemented that into map, and it works fine. BUT! Sometimes, selection circle remains around item even it is not selected. Sometimes yellow, sometimes green. It appears around random items on the ground, and it disappears just as random.

Any clues why this occurs, what exactly occurs, and how to fix it?
leScreenshot.jpg
 
Status
Not open for further replies.
Top