Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Halfblind

Decoration Sprite Questions

Recommended Posts

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?

Share this post


Link to post

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?

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post

Alright. Here is a (little unclean) solution. Give your decorations these flags:

+SOLID
+SHOOTABLE
+NODAMAGE
+NOBLOOD
+NOTAUTOAIMED

Health 1
Mass 10000000
Obviously, 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.

Share this post


Link to post

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.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×