Is there some way to make sprites rotation to death?
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.
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.
-
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?
You guys know sprite rotation, But is there some way to give sprite rotations to a death animation? (I think that you guys understood)
Re: Is there some way to make sprites rotation to death?
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.
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.
Re: Is there some way to make sprites rotation to death?
https://zdoom.org/wiki/A_SetSpriteRotationagenten 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.
Re: Is there some way to make sprites rotation to death?
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.
Re: Is there some way to make sprites rotation to death?
kodi wrote: https://zdoom.org/wiki/A_SetSpriteRotation
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.
Re: Is there some way to make sprites rotation to death?
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.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 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.
