Duke4.net Forums: Sprites on swing doors - Duke4.net Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Sprites on swing doors

User is offline   NightFright 

  • The Truth is in here

#1

I have a little problem with sprites attached to swing doors and wondered if anybody knows a solution.

Let's assume you have a swing door (in my case one with two parts) and you want to put a sprite onto the door (or one half of it), let's say an "out of order" sign or something. What happens now when the swing door opens is that the sprite that was supposed to move with the door stays where it was before, i.e. at the position of the closed door.

Is there a way to make the sprite move with the door (and ofc if so, how is it done)?

This post has been edited by NightFright: 13 May 2016 - 12:42 AM

0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#2

Try this: Put a sector in front of the other that moves too. Then press F8 on sprite and change the statnum to 1.
0

User is offline   NightFright 

  • The Truth is in here

#3

You mean like an invisible swing door with a sector effector just like the real door and the sprite inside?
0

User is offline   Mark 

#4

But at some point isn't the invisible door sector going to overlap the original door sector?

If the second door is offset slightly to the side to keep that from happening the sprite will appear to drift across the door as they open. Its hard to picture it in my head. Maybe I'm totally off on this.

This post has been edited by Mark.: 13 May 2016 - 04:20 PM

0

User is offline   deuxsonic 

#5

Any time there's a sprite on something that moves, it doesn't really move smoothly with the sector but in kind of a jerky step fashion.
0

User is offline   Micky C 

  • Honored Donor

#6

Fairly sure sprites simply don't move with swing doors.

What you want to do is create a rotate-rise effect with two thin sectors connected to each other. One will be raised up and textured as the door, the other one is a thin bit on the ground with the relativity bit set such that any sprites in there will move with the door. It all moves as one unit.
0

User is offline   deuxsonic 

#7

With all this I guess creating a new door texture would probably be easier.
0

User is offline   Mark 

#8

I was going to mention that except I'm guessing he wants to use stock textures only.
0

User is offline   Danukem 

  • Duke Plus Developer

#9

View Postdeuxsonic, on 14 May 2016 - 03:00 AM, said:

With all this I guess creating a new door texture would probably be easier.


This is true. If he's going to use stock textures it is better to just accept the limitation and not have a sprite moving with the door. It's hard enough to make a level even when you aren't fighting the game engine limitations.
0

User is offline   Forge 

  • Speaker of the Outhouse

#10

As Micky mentioned - rise/rotate sector (without using the "rise" part)
This only works "smoothly" if the inactive sprite is located in the same spot as the pivot point.
Put the rotating sector in front of the swinging door sector. Adjust the pivot point and speed to match the door & keep it from clipping into the door sector. The sprite is going to "slide" a little when the rotating sector moves (because the sprite probably won't be directly over the pivot point)- but it shouldn't be too extreme. It will keep getting worse the more the sector "opens and closes". For that reason I'd make it possible to be activated one time only.
(or just do away with the door completely and use the rotating sector as the "door" with a pivot point at one end - or - have it like the pivoting door to the book store in E1L2)
Adjust and experiment

Attached File  door.7z (426bytes)
Number of downloads: 57

This post has been edited by Forge: 14 May 2016 - 03:07 PM

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks not owned by Voidpoint, LLC are the sole property of their respective owners. Play Ion Fury! ;) © Voidpoint, LLC

Enter your sign in name and password


Sign in options