Is it possible to create a thing that doesn't rotate?

Ask about editing graphics, sounds, models, music, etc here!
Shaders (GLSL) and SNDINFO questions also go here!

Moderators: GZDoom Developers, Raze Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Is it possible to create a thing that doesn't rotate?

Postby foul_owl » Wed Mar 17, 2021 5:28 pm

I've followed the decorate tutorials and have made some basic decorations.

I was wondering, is it possible to make a thing that doesn't always face the player?

If so, what would I add to the thing definition to accomplish this?

I realize the thing would have a thickness of zero, but it could work nicely for some small decorations.
User avatar
foul_owl
 
Joined: 25 Jan 2012

Re: Is it possible to create a thing that doesn't rotate?

Postby Lagi » Thu Mar 18, 2021 2:33 am

if you have 8 sprites that end with 1,2,3,4,5,6,7,8 it has rotation

if your sprite end with 0 it always face player

check this monster. His frame A has 8 direction, but his ice corpse has only 1 direction and always face player.

for engine the code is absolutely the same, you need only to add more sprites and end their name with numbers 1 to 8 instead 0.

so if you have Decoration0 sprite, just rename it to Decoration1, and draw Decoration 2... Decoration8.

User avatar
Lagi
 
Joined: 23 Jun 2018
Location: Thou shalt alter thy beliefs with new evidence

Re: Is it possible to create a thing that doesn't rotate?

Postby Jarewill » Thu Mar 18, 2021 4:57 am

Alternatively, you could add the FLATSPRITE / WALLSPRITE flag to your actor.
WALLSPRITES will always stand straight, but still will need to be rotated properly, meanwhile FLATSPRITES will lay on the ground and will have to be tilted using the pitch property.
Jarewill
 
 
 
Joined: 21 Jul 2019

Re: Is it possible to create a thing that doesn't rotate?

Postby foul_owl » Thu Mar 18, 2021 4:06 pm

Lagi wrote:so if you have Decoration0 sprite, just rename it to Decoration1, and draw Decoration 2... Decoration8.


Thank you! I really just need a "side view".

So I can just make a sprite 3 and 7 and it will work?
User avatar
foul_owl
 
Joined: 25 Jan 2012

Re: Is it possible to create a thing that doesn't rotate?

Postby Jarewill » Fri Mar 19, 2021 1:04 am

foul_owl wrote:So I can just make a sprite 3 and 7 and it will work?

Not possible, the game will error out if there's not enough rotations.
There has to be either 0 or all 8 rotations for it to work.

However you could copy the 3 and 7 rotations and rename them to the rest.
For example: Rot3 would be copied and named rot1, rot2 and rot4, meanwhile rot7 would be copied and named rot5, rot6 and rot8.
Jarewill
 
 
 
Joined: 21 Jul 2019

Re: Is it possible to create a thing that doesn't rotate?

Postby Lagi » Fri Mar 19, 2021 2:01 am

I would draw 2 sprites (front back / and side), call them

BOXXA1A2A8A5A4A6
BOXXA3A7

not sure if 1st naming will work (never use that), but second name BOXXA3A7 (for both side direction) work for sure
User avatar
Lagi
 
Joined: 23 Jun 2018
Location: Thou shalt alter thy beliefs with new evidence


Return to Assets (and other stuff)

Who is online

Users browsing this forum: No registered users and 1 guest