Halfblind Posted October 16, 2014 Hey guys, I have been toying with the Heretic and Hexen decoration sprites recently. I have been trying to add some light physics to them. I was hoping to make most of them shootable but not movable in heretic. This way the projectile does not pass them. This creates realism and strategy at the same time. While small sprites like candles are too small to be shot at, Barrels, pots and urns can be moved, candelabras, and other heavy objects should not be able to move. I was just wondering, how do I make them shootable and not movable? 0 Share this post Link to post
scifista42 Posted October 16, 2014 Give them a Shootable flag and a non-zero Health, and set their Mass to something like 10000000. EDIT: Can you edit in either DEHACKED or DECORATE, right? 0 Share this post Link to post
Halfblind Posted October 16, 2014 scifista42 said:Give them a Shootable flag and a non-zero Health, and set their Mass to something like 10000000. EDIT: Can you edit in either DEHACKED or DECORATE, right? I use Zdoom/DB2/Slade3 so Decorate works fine. I also do not see how the decoration sprite would need a Health property when it will need to be indestructible. 0 Share this post Link to post
scifista42 Posted October 17, 2014 Halfblind said:I also do not see how the decoration sprite would need a Health property when it will need to be indestructible. When you said "shootable", I thought you mean "destructible". How did you mean it, then? I thought that all SOLID decorations block shots. Unless their height is lesser than 32 - if it is, the projectiles would simply fly above the decoration. 0 Share this post Link to post
Gez Posted October 17, 2014 They don't block hitscans if they aren't shootable, though. 0 Share this post Link to post
Halfblind Posted October 18, 2014 scifista42 said:When you said "shootable", I thought you mean "destructible". How did you mean it, then? I thought that all SOLID decorations block shots. Unless their height is lesser than 32 - if it is, the projectiles would simply fly above the decoration. In Heretic (with Zdoom) if you add the solid property the projectile passes through the sprite and does not make a puff when shooting it. If you add the shootable property it hits the object and forces it backwards. This is great for barrels and pots but not for light sources such as tall candle sticks. If you add a mass index it makes it stay put as it is shot at. If enough shots have been fired at it it still dies and is removed from the environment. For a light source I do not want this. I want it to still remain on the map otherwize the sector lighting will look funny without a light source sprite in the center of it. 0 Share this post Link to post
scifista42 Posted October 18, 2014 Alright. Here is a (little unclean) solution. Give your decorations these flags: +SOLID +SHOOTABLE +NODAMAGE +NOBLOOD +NOTAUTOAIMED Health 1 Mass 10000000Obviously, NODAMAGE prevents the thing from dying, NOBLOOD prevents it from bleeding, NOTAUTOAIMED makes it unaffected by autoaim (not sure if this flag works in current Zandronum); and I believe that Health of shootable things must be >0, otherwise it might disappear immediately (but maybe I'm wrong). If you want to make sure the thing doesn't move at all, make another invisible and blocking decoration and place it onto each of the first ones, so that they get stuck. 0 Share this post Link to post
Halfblind Posted October 23, 2014 Thanks scifista42; that script seems to work fine. I did a "give all" and fired everything that I had at them and they work like I want. Thanks a whole lot. Now All I need is to have some time to get everything working. Now I am 1 step closer to starting my project "Tiny Heretic." I hope to have my resources compiled by the end of the year. Thanks again. 0 Share this post Link to post