Jump to content
  • 0

Moving decorative objects along with ceilings (GZdoom)


Basin_is_BACK

Question

Is there an easy way to move decorative objects (eg. hanging bodies, chandeliers) along with the ceilings they hang from as the ceilings raise/lower?

 

I managed to get a custom object to appear in GZDoom Ultimate Doom Builder, but it won't move along with the ceilings when I want it to. Here's the code in the Zscript that I used to create the thing

 

class titanRckt : Actor
{
	Default
	{
		Radius 35;
		Height 229;
		+SPAWNCEILING;
		+NOGRAVITY;
		Tag "TitanRocket";
      //$Category User_Defined
      //$Title Titan Rocket
      //$Color 17
      //$Arg0 "Variable description"
      //$Arg0Tooltip "Titan Rocket"
	}
  States
  {
  Spawn:
    TITN A -1;
    Stop;
  }
}

 

I'm hoping there's a simpler method than manually setting the position every few ticks so it appears to move up...

Share this post


Link to post

2 answers to this question

Recommended Posts

  • 0

Does applying the +CEILINGHUGGER flag have any effect? That's for projectiles, but it may work on decorative objects, too. There's also +MOVEWITHSECTOR, but I believe that's to keep things on the floor rather than attached to the ceiling.

 

Failing either of those, the solution you proposed should work! It's not ideal, but checking the z position of the actor and setting it to the ceiling should have the desired effect.

Edited by Snarboo
wrong solution proposed

Share this post


Link to post
  • 0

Thanks for the advice. Unfortunately, none of my attempts seemed to work (even the "setactorposition" which suggests a problem at my end somewhere), but I eventually solved the problem by changing the height of the things and their offsets in the bounding boxes, so I ended up with an 800 unit high object, which was "pressed down" by the ceiling, and moved upwards as the ceiling raised. Thank goodness I'm only using these for set decoration and nothing else!

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...