Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  

Lower/Raise States (Dehacked)

Recommended Posts

Is there a way to increase the duration of a weapons lower and raise state in Dehacked? (or Whacked).

I have a weapon that's 180 pixels tall and upon entering the lower or raise state there is a 'cut off' point where the motion stops. But because of how tall the image is, the cut off point is mid lower/raise so the weapon basically disappears or reappears when selected or deselected.

To put it simply. When i select the weapon, half of it will appear instantly and then raise.

When i lower it, it will fall half way and then just disappear.

Is this more or less an engine limitation?

Share this post

Link to post

The weapon sprite position is used by the game to determine if it's time to change the state. In other words, when the weapon is low enough, the game swaps it with another; and when it's high enough, the game initiates its idle sequence. Unfortunately, there's no way to affect the position at which it starts, and which removes it during lowering (with a DEHACKED patch, at least).

There's a questionable way to affect the speed of lowering and/or rising, but it won't help with this particular problem.

Share this post

Link to post

Perhaps try making the sprite taller?
Like, the sprite takes 180 pixels, but you add 60 more to the top/bottom, but transparent.

Share this post

Link to post

That wont work unfortunately, it'll still replicate the same behaviour. The sprite needs to be positioned correctly above the hud to display properly. With just a transparent space above it, there's no change. Positioning it so the transparency is drawn first means the actual sprite won't be visible or only partially.

The raise/lower states are at fixed rates and determine where to draw the image (depending on the size) in order to display it correctly on screen. Therefore the sprite needs to be ~150 pixels high max to draw it completely on raise/lower. Otherwise it seems to draw it 'early' in order to keep it within the two states time frame.

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
Sign in to follow this