![]() |
![]() |
|||||||||||||||||||
Object Shadows
![]() Developer Last Online: Apr 2018
This relatively simplistic addon adds drop shadows for both players and objects.
You may use the console variables "playershadows" and "objectshadows" to toggle them, and "addshadow <object>" to add a shadow to an object type. By default, object shadows are off as they can eat performance depending on what objects are whitelisted by the server. Add shadows to objects placed in huge quantities, such as rings, at you (and your computer's) own risk. Also included is a MD2 for it, made to be perfectly 1:1 with the actual sprite in terms of look and size. To use it, add "OSHD OSHD.md2 2.0 0.0" to your md2.dat. Special thanks go out to RedEnchilada for helping me with the original version of the script, and MonsterIestyn for finding a method to retrieve the validity of MT_ constants without Lua throwing an error message. Download Now
Screenshots Supporters / CoAuthors Show Your Support
|
Comments |
![]() |
#2 | |
'That brit'
Judge
|
It's a pretty simple script, but it works. My only complaint is that it was a bit hard to actually see the shadow a lot of the time for me. It could also scale itself depending on the height difference from the character, maybe with a console variable? Finally, a console variable to disable them might also be nice in case people wanted to use the OpenGL sprite shadows, no point having 2 sets of shadows. Nothing I'm going to keep this back over though.
__________________
Quote:
|
|
![]() |
![]() |
![]() |
#3 |
Ya Gal Sal Here (σᴥσ)
Judge
|
Yep, I posted a gif of this a week or so ago and got some of the same critique; I just have to get around to implementing them.
|
![]() |
![]() |
![]() |
#5 |
|
![]() This Lua script doesn't work in Match, Tag and CTF. |
![]() |
![]() |
![]() |
#6 |
Soubrette aux yeux jaunes?
|
It's pretty dumb but the script doesn't check if there is a player mobj on the map, resulting in a "crash" when the script attempts to launch on a spectator player.
I know I'm dumb at Lua, but adding this at the start of the Hook fixes the problem: Code:
addHook("ThinkFrame", function() for player in players.iterate do if not player.mo return end |
![]() |
![]() |
![]() |
#7 |
Ya Gal Sal Here (σᴥσ)
Judge
|
I meant to update this sooner (as in, the "sooner than nearly a year" type of sooner) to fix that bug, but I wanted to add more features. I was going to add even more to it, but I kinda like how it is now. (BTW, just to note, the above fix only half-worked. It prevents the error, but the shadow won't appear once you stop spectating. I had to do something slightly different. Thanks for helping, though; it pointed me towards my current fix!)
Now the sprite is darker, it shrinks depending on how high above the ground you are, and it has a cvar for turning them on/off (playershadows <bool>). Last edited by TehRealSalt; 08-06-2016 at 06:18 AM. Reason: aaaaa i forgot i changed the name of the cvar later |
![]() |
![]() |
![]() |
#8 |
Wishes to change his name
|
Minor bug, the shadow doesn't flip with gravity.
Spoiler: Also made a small model for it. |
![]() |
![]() |
![]() |
#9 |
Iron Claws
|
What about if the shadows were actually shaped like the characters and objects that the shadows mimic? I'm pretty sure I saw something like that before. Probably a build of SRB2 CB. I'm not a big fan of the dark blob shadows.
|
![]() |
![]() |
![]() |
#10 |
Wishes to change his name
|
OpenGL does that by default, just need to use the "shadow" command.
|
![]() |
![]() |
![]() |
#11 |
Iron Claws
|
|
![]() |
![]() |
![]() |
#12 |
ヒトデパンと奇妙なジャム
Developer
|
You'd need to fix splats in Software first.
__________________
I'm deleting WOW + FURYHUNTER your not int his BLAPCK robo ass memes because that was a bad pun MonsterIestyn hubjim |
![]() |
![]() |
![]() |
#13 |
Ya Gal Sal Here (σᴥσ)
Judge
|
Fixed the reverse gravity shadow error, and slight gfx offset adjustments.
Last edited by TehRealSalt; 02-18-2016 at 10:23 PM. |
![]() |
![]() |
![]() |
#14 |
Ya Gal Sal Here (σᴥσ)
Judge
|
New update.
|
![]() |
![]() |
![]() |
Thread Tools | |
|
|