• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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,240
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