• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

work with shadows

Status
Not open for further replies.
Level 17
Joined
Apr 27, 2008
Messages
2,455
Because some jass types don't have a reference counter, you can do silly stuff like that :

JASS:
function GetFutureNextImage takes nothing returns image
    local image im = CreateImage("ReplaceableTextures\\Splats\\AuraRune9b.blp",0,0,0,0,0,0,0,0,0,1 )
    call DestroyImage(im)
    return im
endfunction
By itself that's not really useful, but unit shadows share the same handles ids as the ones you create with triggers, so it's easy to play with units' shadow with this function and an unit indexer.
(Someone could race against Nestharus to make a such resource, because obviously he will need it one day or an other :ogre_hurrhurr:)

Have fun to test it, i remember issues when you destroy them, such as unit selections screwed up (at least visually), but changing the opacity/color should be fine.

Maybe you can do the same with other widgets' shadow. (can't remember if there is a shadow for items and destructables/doodads).

Also i think the shadow is displayed only if the wc3 graphic settings are enough high, so that would mean that such images would not be created for all players, so not always the same image handle id for the same image for each player ?

I've tried to do the same with texttags, but it seems that the ones created by the game and the ones created by a trigger doesn't share the same range of handle id.
And since the return bug is dead, there is probably 0 % chance to get them, if there was any.

I suppose there are such other types, though, such as lightning.
 
Someone should make a noob-friendly library to modify a unit's shadows.

That bug is a cool one, but no one has really used it since it was brought up. :p I suppose it isn't *common knowledge*, but there are some cool stuff to be done.

Also i think the shadow is displayed only if the wc3 graphic settings are enough high, so that would mean that such images would not be created for all players, so not always the same image handle id for the same image for each player ?

I would imagine that Blizzard would create the handle globally, but render it only for anyone who has shadows enabled. Needs testing though, maybe I'll check it out. :)
 
Level 17
Joined
Apr 27, 2008
Messages
2,455
I would imagine that Blizzard would create the handle globally, but render it only for anyone who has shadows enabled. Needs testing though, maybe I'll check it out. :)

Maybe, maybe not, depends mostly if you can create an image in a local block or not i guess.
And if your guess is right, maybe you can still display a shadow afterward, regardless the graphic options, that seems silly though, but that's worth a try.
 
Level 17
Joined
Apr 27, 2008
Messages
2,455
True. I just realized that images aren't agents, so I assume they can be created locally without issues.

Hmm, i certainly wouldn't be so categoric, nobody has tested this claim as far i know, that would be a good test :thumbs_up:
And such tests are supposed to be friendly now with Moyack's JNGP, aren't they ?

P.S. Do you still have Warcraft 3 on your comp?
Nope, i'm just nostalgic, you know.
One day maybe i will reinstall it, if it's possible with a virtual cd, since i don't have anymore a cd player on the appropriate computer.
 
Status
Not open for further replies.
Top