Constant floating actor with ground smashes?

Archive of the old editing forum
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.
User avatar
Doomedarchviledemon
Posts: 31
Joined: Tue Jul 05, 2011 9:17 pm

Constant floating actor with ground smashes?

Post by Doomedarchviledemon »

First of all, sorry, I do not know what else to put for the subject.

On with the real reason for this topic, I am trying to make an actor that will continually float at a fixed height while chasing the player but also have the ability to smash the ground to cause an earthquake (and possibly crush those under it) and then move back in its fixed floating height afterwards and continue to chase the player. But I am not sure how I can achieve this and I haven't found anything on the wiki that would help me thus far. Any help would be most appreciated.
User avatar
Jekyll Grim Payne
 
 
Posts: 936
Joined: Mon Jul 21, 2008 4:08 am
Discord: Agent_Ash#4401
Github ID: jekyllgrim
Graphics Processor: nVidia (Modern GZDoom)

Re: Constant floating actor with ground smashes?

Post by Jekyll Grim Payne »

I think your best bet would be to make it constantly floating without an ability to change height (which, I think, is achieved by +NOGRAVITY and -FLOAT), and the 'smashing down' effect could be produced by animation alone. Otherwise you'd have to keep thrusting it up and down which would make it impossible to precisely control its floating height.
User avatar
Doomedarchviledemon
Posts: 31
Joined: Tue Jul 05, 2011 9:17 pm

Re: Constant floating actor with ground smashes?

Post by Doomedarchviledemon »

Alright, I can see that almost working. The issue that I see with that, however, is that the hit box wouldn't match up with the actor when it is animating smashing down to the ground. I don't want the hit box to be just one giant block either so the player can just hit the empty bottom part of the actor and still register a hit. I'll start from there though and see if maybe I can fiddle with it.

On the other hand, I just learned about Zscripts. While I don't know how to code yet I was looking around at some of the actor functions and one caught my eye called void SetZ(double z). While I am not entirely sure the function matches what I think it does, but it sounds like this would be able to be used to chance the actor's Z position when called? Hopefully via a smooth transition but I am guessing it's instantaneous? I'm wondering if I could get similar results by using this. Or if there's a Decorate variant that moves an actor's Z location in a smooth transition?

Return to “Editing (Archive)”