Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Shkwarkel

The thing turns to face the player.

Recommended Posts

how to disable turning an thing to face the player? Is that even possible? If anyone has done this, please share the solution. I have a task to make a waterfall. I want to replace the frames with animation of the waterfall with some thing. But for this I need to turn off the normal rotation of the thing towards the player. Because the waterfall should not turn around to face the player, it should be static. 

I will attach a photo of what I mean by the word "thing" and I want to replace it with a photo of the waterfall, with animate more.

 

898694381__2023-11-26_182711279.png.10b4c655b43238d1235fec974cede20e.png

Share this post


Link to post

You need sprites. Track down the sprites for the barrel (Shouldn't be hard, but I can't do it right now), but your sprites need to have the same letter but numbers from 1 to 8. You call it XXXXA1 etc, should do the trick. Can add 2 letter-number pairs, the second will be the same but flipped. You can see that on monsters.

 

I think 0 is overwritten by any other number, but not 100% sure.

Share this post


Link to post

I know how animations work. Here are the animations for my weapons. But how to make it so that the object is static and looking in one direction, not at the player. I'm sorry, I probably didn't explain what I need.

 

image.png.b65e2b656f19b26c69feb1c7c3656e87.png

Share this post


Link to post

.

4 minutes ago, ViolentBeetle said:

You need sprites. Track down the sprites for the barrel (Shouldn't be hard, but I can't do it right now), but your sprites need to have the same letter but numbers from 1 to 8. You call it XXXXA1 etc, should do the trick. Can add 2 letter-number pairs, the second will be the same but flipped. You can see that on monsters.

 

I think 0 is overwritten by any other number, but not 100% sure.

.

Share this post


Link to post
3 minutes ago, Shkwarkel said:

But how to make it so that the object is static and looking in one direction, not at the player.

That's the question I answered. It is not handled by the code you posted.

The number at the end of the sprite name is responsible for rotation (In relation to your POV). A sprite named XXXXA0 will be independent of where the thing is facing, XXXXA1 through XXXXA8 are for rotations. Of course, there's only 8 rotations supported, by basic Doom at least, so it is a better fit for monsters than for decorations, but still.

Share this post


Link to post

If you target GZDoom with harware rendering, you can give the object the +WALLSPRITE flag, then it will be static facing single direction.

Share this post


Link to post
1 hour ago, ViolentBeetle said:

That's the question I answered. It is not handled by the code you posted.

The number at the end of the sprite name is responsible for rotation (In relation to your POV). A sprite named XXXXA0 will be independent of where the thing is facing, XXXXA1 through XXXXA8 are for rotations. Of course, there's only 8 rotations supported, by basic Doom at least, so it is a better fit for monsters than for decorations, but still.

I changed the name, but all I get is an error.

 image.png.1a15700b775e7dbb87c84154e9cf89f6.png

 

image.png.b0f05c940b11d22191bc402261b97f4b.png

Share this post


Link to post
1 hour ago, jaeden said:

If you target GZDoom with harware rendering, you can give the object the +WALLSPRITE flag, then it will be static facing single direction.

I tried it, indeed the thing doesn't move, but the picture is completely off.

Share this post


Link to post
4 hours ago, ramon.dexter said:

Apply flag +wallsprite to the said actor.

When add this flag, the picture moves away.

 

image.png.dba7d5b834868bce50aab36505f12c86.png

 

image.png.621342c531978ccf2d5b0f385263a7cb.png

Share this post


Link to post

Okay, I can see you're polish. Please, describe your problem in polish. I'm czech myself, so I think there would be much less noise by translation polish> english and english>czech. I literally don't understand your last post, as it doesnt describe whats happening on the screenshot.

 

Aaand, one thing to note: spawn state in your actor does not make any sense. You have only one frame of animation, repeated triple times, looped. Just, why? Wouldnt it be better to write it like POHP A -1?

Share this post


Link to post
34 minutes ago, ramon.dexter said:

Okay, I can see you're polish. Please, describe your problem in polish. I'm czech myself, so I think there would be much less noise by translation polish> english and english>czech. I literally don't understand your last post, as it doesnt describe whats happening on the screenshot.

 

Aaand, one thing to note: spawn state in your actor does not make any sense. You have only one frame of animation, repeated triple times, looped. Just, why? Wouldnt it be better to write it like POHP A -1?

Domyślnie przedmioty są zawsze zwrócone w stronę gracza. Ja chcę obrócić obiekt w konkretnym kierunku. Aby patrzył tylko w jednym kierunku, a nie obracał się w stronę gracza.

Share this post


Link to post

Okay, got it. You want a sprite that faces always one way, so it doesnt billboard. The flag I sent does exactly this, as it makes the sprite into a wallsprite. A wallsprite is a sprite that could be put on a wall, so it always faces one way.

 

In the previous post you said that 'the picture moves away' - again, repeat that in polish. Because the way the sprite is defined, it cannot move in any way. Also, replace the state into what I adviced you. Having single frame state with loop doesnt make any sense. It just takes up computing power, because the actor always loops.

 

And sorry for not replying in polish...I can read and understand it, but I dont speak it or write it...

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×