Jump to content
  • 0

Weapon change animation instead of raise/lower


Burgish

Question

Hey all,

 

I'm trying to make a set of weapons based on a spellbook, and I want to have pages flip when changing weapons instead of raising or lowering in and out of sight.

 

The A_Raise and A_Lower actions are necessary for the weapons to function, and trying to sneak a few frames into the Select/Deselect states doesn't work because it automatically jumps to the Ready state when A_Raise of A_Lower are done doing their thing, and the spites aren't displayed before they activate.

 

Is there a workaround for this?  Is it possible in Decorate?

Share this post


Link to post

8 answers to this question

Recommended Posts

  • 1

Can't you just create a new Ready state right below the actual one?

Like:

Ready:
	TNT1 AAAAAAAA 2 //Your animation here
Ready1:
	TNT1 A 1 //"True" ready
	Loop;

Then you just need to remember to return to the "Ready1" state after the fire etc. states

Share this post


Link to post
  • 0

Unfortunately, the way this works, the weapons switch once the sprite has completely disappeared.

 

You can hasten the transition by switching to a sprite that's like just one pixel tall, so it'll be fully lowered and fully raised immediately.

 

You may be able to cheat the animation (to avoid the sprite blinking out for two frames) by using an overlay, perhaps.

Share this post


Link to post
  • 0

It should definitely be possible to make it seamless. Even in vanilla dehacked, you can make instant weapon switching by altering frame offsets or calling raise/lower in a 0-length loop.

 

In decorate, it should be pretty straightforward - in the select/deselect state, have a bunch of animation frames that don't call any actions, then on the last frame call something like A_Raise(100) to "raise" the weapon super fast and thus finish the raising sequence instantly.

Share this post


Link to post
  • 0

I have the raise/lower speed set to 100, so it only takes one frame to swap - the problem now is that there's nowhere for me to put the animation.  It jumps immediately to the "ready" state, and any animation there will replay over and over.

 

Is there any way to make the first time the Ready state runs unique and run a different set of commands?  I haven't dabbled in variable checking before - is there a way to make a timer?  Or a counter that ticks up and changes the ready state after the first run, then resets so it happens again the following weapon change?

Share this post


Link to post
  • 0

Can't you just put a bunch action-less frames first? Like...

 

Select:
  WEAP ABCD 2
  WEAP E 1 A_Raise(100)
  Wait //only loops the last frame instead of the whole sequence
Ready:
  WEAP E 1 A_WeaponReady
  Loop
Deselect:
  WEAP DCBA 2
  WEAP A 1 A_Lower(100)
  Wait

 

Share this post


Link to post
  • 0

Unfortunately, before you call A_Raise, the sprite isn't visible.  Its below the screen.  And after A_Raise runs it jumps to Ready state.  So anything that happens before or after A_Raise isn't displayed.

 

Share this post


Link to post
  • 0
6 hours ago, Kan3 said:

Can't you just create a new Ready state right below the actual one?

 

I knew there was a simple way around this that I was missing. Thanks!  🍗🍗🍗

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
Answer this question...

×   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...