Jump to content

Lower/Raise States (Dehacked)


Six

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

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...