Is there some way to make sprites rotation to death?

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
XASSASSINX
Posts: 380
Joined: Tue Dec 20, 2016 4:53 pm
Location: MURICAA BROTHER! Just kidding, Brazil.

Is there some way to make sprites rotation to death?

Post by XASSASSINX »

You guys know sprite rotation, But is there some way to give sprite rotations to a death animation? (I think that you guys understood)
agenten
Posts: 14
Joined: Sun Dec 04, 2016 10:34 am

Re: Is there some way to make sprites rotation to death?

Post by agenten »

You want the monster to perform all its death rotation frames in sequence, to the effect that the monster looks like it's spinning in a full circle while dying?

Could be done, you'd need to I guess copy all those frames under different spritenames, and do some very careful indexing to make sure that the right sprite plays at the right time *per angle of rotation*. Or you could possibly use single-rotation sprites for that specific state, and simply play them all in the correct sequence, and it would look the same from any angle. If there's an easier way to do this, I'd look for that because my strategy sounds like a ton of work.
User avatar
kodi
 
 
Posts: 1361
Joined: Mon May 06, 2013 8:02 am

Re: Is there some way to make sprites rotation to death?

Post by kodi »

agenten wrote:You want the monster to perform all its death rotation frames in sequence, to the effect that the monster looks like it's spinning in a full circle while dying?

Could be done, you'd need to I guess copy all those frames under different spritenames, and do some very careful indexing to make sure that the right sprite plays at the right time *per angle of rotation*. Or you could possibly use single-rotation sprites for that specific state, and simply play them all in the correct sequence, and it would look the same from any angle. If there's an easier way to do this, I'd look for that because my strategy sounds like a ton of work.
https://zdoom.org/wiki/A_SetSpriteRotation
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: Is there some way to make sprites rotation to death?

Post by Gez »

The only reason Doom's death animations don't have rotations is that the sprite lumps are given the rotation number 0. Same reason the Wolf SS has no attack rotation. That doesn't stop other monsters from having attack rotations. There's absolutely no reason you can't give rotations to a monster's death anim; you just need to do the pixel work to create them.
agenten
Posts: 14
Joined: Sun Dec 04, 2016 10:34 am

Re: Is there some way to make sprites rotation to death?

Post by agenten »


Thank you.

I'm guessing there's also some way to just control the actor's *actual* Angle property within a State? I have an enemy I'd like to have turn in a 360 while firing, but unlike this method above, do change the actor angle, so his shot direction is modified by it. (it's a chaingun-type enemy).

I also have another idea where I would need to have the actor change its *angle* within State but not its *sprite angle* displayed. Will do some digging.
User avatar
kodi
 
 
Posts: 1361
Joined: Mon May 06, 2013 8:02 am

Re: Is there some way to make sprites rotation to death?

Post by kodi »

agenten wrote:I'm guessing there's also some way to just control the actor's *actual* Angle property within a State? I have an enemy I'd like to have turn in a 360 while firing, but unlike this method above, do change the actor angle, so his shot direction is modified by it. (it's a chaingun-type enemy).

I also have another idea where I would need to have the actor change its *angle* within State but not its *sprite angle* displayed. Will do some digging.
For the first one, use TNT1 A 0 A_SetAngle(angle+IncrementValueHere) interspersed with your bullet firing action, all of it looped or repeated for 360/IncrementValueHere times.
For the second one, do the above while also calling A_SetSpriteRotation to counter-rotate for each increment I guess. I have no idea why you'd want to do this though.
Locked

Return to “Editing (Archive)”