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

Why do lost souls fly up to the ceiling when they're infighting?

Recommended Posts

6 hours ago, Piper Maru said:

Because they want to feel taller.

Head and shoulders above the rest.

Share this post


Link to post

On a related note, why are Cacodemons so damn annoying when they get blasted? Why can't they stop themselves from being blown back and regain the distance they lost after each blast? How could one fix this irritating behavior in DECORATE?

Share this post


Link to post
59 minutes ago, Nevander said:

On a related note, why are Cacodemons so damn annoying when they get blasted? Why can't they stop themselves from being blown back and regain the distance they lost after each blast? How could one fix this irritating behavior in DECORATE?

There's no friction applied to flying monsters which are not on ground level, so they retain the momentum imparted by the blast until they collide with something. (The monster movement code does not affect the actor's momentum, instead it moves in little jumps that are too small to distinguish. Enough momentum will cancel out the monster's attempts to move.) I find the behaviour of lost souls in this situation just as annoying, as a single bullet will halt their charge and leave them to float very slowly across the landscape until a collision which may be several minutes away.

 

No idea if decorate can apply friction to actors in the air.

 

Share this post


Link to post

You can gradually scale down a monster's velocity with A_ScaleVelocity, put that in their See state sequence and it should let them cease their drifting around. It has no impact on their normal movement since that works differently, by making steps when calling A_Chase instead of by acquiring a momentum.

Share this post


Link to post
1 hour ago, Nevander said:

On a related note, why are Cacodemons so damn annoying when they get blasted? Why can't they stop themselves from being blown back and regain the distance they lost after each blast? How could one fix this irritating behavior in DECORATE?

I think you could increase their mass, which would keep them from being knocked back as much (could be wrong, though). I kinda like their behavior, myself, though. It keeps them from all being in your face all the time, and it let's you knock 'em around a bit :)

Share this post


Link to post
33 minutes ago, kb1 said:

I think you could increase their mass, which would keep them from being knocked back as much (could be wrong, though). I kinda like their behavior, myself, though. It keeps them from all being in your face all the time, and it let's you knock 'em around a bit :)

 

I sorta look at it this way:

 

You blast a bully like a Cacodemon with a shotgun, and he 'begs off' while still trying to hit you with a fireball, but realizing you aren't a simple pushover and COULD kill it, he floats away, only to come back at you when you forget about him or are occupied with other monsters.

 

Sure, I understand the TECHNICAL reasons why the Cacos do what they do, but that shit is boring!

I like to think they just go into "tactical retreat" then regroup. =)

 

As for the Lost Souls, well, when they face off, it's like a hell version of when two toughs meet in a bar... "Let's take this thing outside, tough guy!"

But in their case, it's, "Ok flamehead, let's take this thing to the ceiling, you and me, punk!"  Hah..

Share this post


Link to post
1 hour ago, Gez said:

You can gradually scale down a monster's velocity with A_ScaleVelocity, put that in their See state sequence and it should let them cease their drifting around. It has no impact on their normal movement since that works differently, by making steps when calling A_Chase instead of by acquiring a momentum.

Something like this maybe? Seems to be working but I want to know if I did it right:

See:
   HEAD A 0 A_ScaleVelocity(0.80)
   HEAD AA 3 A_Chase
   HEAD B 0 A_ScaleVelocity(0.60)
   HEAD BB 3 A_Chase
   HEAD C 0 A_ScaleVelocity(0.40)
   HEAD CC 3 A_Chase
   HEAD D 0 A_ScaleVelocity(0.20)
   HEAD DD 3 A_Chase
   HEAD D 0 A_ScaleVelocity(0.0)
   Loop

 

Share this post


Link to post

Oh god that's ugly.
 Why do you go through ABCD? Custom cacos? Normal cacodemons only use frame A for their chase, since they don't have legs to move. BCD are the attack frames.

 

Anyway just do that for regular cacos with your extra frames.

    See:
        HEAD ABCD 3
        {
            A_Chase;
            A_ScaleVelocity(0.50);
        }
        Loop

Note: scale velocity is a scale. That means that when you call it with 0.5, it halves the current velocity. Then when it loops back and call it again, it halves the velocity again -- so it's a quarter of its initial value. Next loop it halves again, so 1/8. Then again (1/16), and again (1/32), and again (1/64)... It'll be reset to zero pretty soon. No need to scale it by 0.

Share this post


Link to post

I always figured it had something to do with basic animal instincts, similar to animals trying to make themselves look big to intimidate aggressors.

Share this post


Link to post
55 minutes ago, Gez said:

Oh god that's ugly.
 Why do you go through ABCD? Custom cacos? Normal cacodemons only use frame A for their chase, since they don't have legs to move. BCD are the attack frames.

 

Note: scale velocity is a scale. That means that when you call it with 0.5, it halves the current velocity. Then when it loops back and call it again, it halves the velocity again -- so it's a quarter of its initial value. Next loop it halves again, so 1/8. Then again (1/16), and again (1/32), and again (1/64)... It'll be reset to zero pretty soon. No need to scale it by 0.

It's the Doom 64 Cacodemon, it has A-D for movement because it "moves" side to side.

 

I did the above because I prefer not to use anonymous functions. They are still pretty new and a ton of people still run older versions of GZDoom before they were added. I don't want to break my mod on every version up to when they were added when it can be done without them. How would you write it without them? I know it's a scale, that's why I took 95% of the velocity, then 60% of that, and so on. I don't want to instantly reduce to half and then 0 because that's too fast of a stop. Does velocity automatically get reduced to 0 even if you don't call scale velocity?

 

And just to ask, what's ugly exactly about my approach? Is it just preference or is there actually something wrong with it? Meaning something that could produce errors or undesired behavior?

Share this post


Link to post

It wouldn't be 50% and then 0. Like Gez said, it would 50%, and then 50% of 50% (25%), then 50% of that (12.5%), and so on. If you want it to slow down more gradually, make it 60% or even more.

 

To do exactly the same thing as the code Gez posted without an anonymous function:

  See:
    HEAD A 0 A_Chase
    HEAD A 3 A_ScaleVelocity(0.50)
    HEAD B 0 A_Chase
    HEAD B 3 A_ScaleVelocity(0.50)
    HEAD C 0 A_Chase
    HEAD C 3 A_ScaleVelocity(0.50)
    HEAD D 0 A_Chase
    HEAD D 3 A_ScaleVelocity(0.50)
    Loop

This is similar to what you posted, but with 3 tics per frame instead of 6, and the velocity scaling is done better. If it is supposed to be 6 tic per frame with that sprite, then just change each 3 into a 6.

Share this post


Link to post
6 hours ago, RjY said:

I find the behaviour of lost souls in this situation just as annoying, as a single bullet will halt their charge and leave them to float very slowly across the landscape until a collision which may be several minutes away.

 

 

That's a different issue from the Cacodemon one. When a charging Lost Soul gets hit, they (the developers at id) forgot to set it into its pain state and make it fight back. They also set its momentum to 0, so the result is that it drifts away in the direction of the damage you have applied to it.

 

Sometimes I look at the source code and a wonder what they were trying to do. Maybe they wanted the Lost Soul to go to its pain state when it was hit, that way it could recover and fight back. Maybe they wanted it to continue its charge toward the player even though it was being hit. Either way, they screwed up and as a result, the Lost Soul is not a dangerous monster unless you use -fast or play on Nightmare. 

 

I had some hilarious time on E2M8 with the Lost Souls. You wait for it to charge, then you shoot it with the pistol so it drifts in the direction that you want. If the Cyberdemon wasn't there, you could easily organize races where a player would have to push his Lost Soul around the level and the first one to complete a lap wins the race. 

Share this post


Link to post
1 hour ago, Empyre said:

If it is supposed to be 6 tic per frame with that sprite, then just change each 3 into a 6.

That's not remotely the same thing. Changing it to 6 would cause it to move at half speed and be half as aggressive - meanwhile, defining two states with the same sprite at duration 3, each calling A_Chase causes it to animate the same as changing the frames to 6, but without halving the speed - since, y'know, you're not calling the function that moves the actor half as often.

Share this post


Link to post
3 hours ago, axdoomer said:

When a charging Lost Soul gets hit, they (the developers at id) forgot to set it into its pain state and make it fight back. They also set its momentum to 0, so the result is that it drifts away in the direction of the damage you have applied to it.

Indeed. I made the change 9 years ago now ;) (and it's based on something even older)

 

3 hours ago, axdoomer said:

I had some hilarious time on E2M8 with the Lost Souls. You wait for it to charge, then you shoot it with the pistol so it drifts in the direction that you want. If the Cyberdemon wasn't there, you could easily organize races where a player would have to push his Lost Soul around the level and the first one to complete a lap wins the race. 

Haha, I used to play pigeon shooting. Wait for the thing to charge, then run out of the way, and try to shoot it as it flies past you perpendicularly. Shouting "PULL!" is optional.

 

Edited by RjY

Share this post


Link to post
4 hours ago, Arctangent said:

That's not remotely the same thing. Changing it to 6 would cause it to move at half speed and be half as aggressive - meanwhile, defining two states with the same sprite at duration 3, each calling A_Chase causes it to animate the same as changing the frames to 6, but without halving the speed - since, y'know, you're not calling the function that moves the actor half as often.

Thanks! Now I have learned something new. I have not yet made monsters, only weapons and pick-ups.

Share this post


Link to post
On 4/17/2017 at 6:19 PM, RjY said:

I find the behaviour of lost souls in this situation just as annoying, as a single bullet will halt their charge and leave them to float very slowly across the landscape until a collision which may be several minutes away.

How would one fix this behavior in DECORATE? I just had it happen to me and remembered this thread, so maybe there's a way to fix it in DECORATE like the Cacodemon drifting away too.

Share this post


Link to post

That cannot be changed from DECORATE.

 

The code fragment responsible here is deep inside P_DamageMobj:

 


    if (target->flags & MF_SKULLFLY)
    {
        target->Vel.Zero();
    }

 

Without some actual scripting to clear the flag you won't be able to do anything about it, but even if you got that far, you'd have problems deciding afterward what to do with the flag because it is not particularly straightforward to decide whether to set it again or not.

 

Share this post


Link to post

This is a little known fact, but Lost Souls are actually very polite. Unlike the other demons who just duke it out in front of everyone, Lost Souls prefer to resolve their conflicts in private, even if it is just a few meters above your head.

Share this post


Link to post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×