Projectile that gives a monster Z-Velocity?
Moderator: GZDoom Developers
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Projectile that gives a monster Z-Velocity?
I'm trying to make a weapon that has multiple attacks, and one of them is an uppercut. I made the attack shoot out an invisible projectile, and I'm trying to get that projectile to launch monsters upwards. I've tried ThrustThingZ, but clearly that does not work. Any tips?
- Caligari87
- Admin
- Posts: 6174
- Joined: Thu Feb 26, 2004 3:02 pm
- Preferred Pronouns: He/Him
- Contact:
Re: Projectile that gives a monster Z-Velocity?
If it "clearly doesn't work" then you're likely doing something wrong, as that's pretty much the kind of thing "ThrustThingZ" is designed to do. Please post the relevant code (using the
Code: Select all
and [spoiler] tags, or pastebin if necessary) so we can see what you're doing and provide some advice.
8-)
Re: Projectile that gives a monster Z-Velocity?
Spoiler:Here it is.
-
- Posts: 4949
- Joined: Sun Nov 14, 2010 12:59 am
Re: Projectile that gives a monster Z-Velocity?
What you're doing there is changing the velocity of the projectile itself, not the thing it hit. To make it work, set the [wiki=Actor_flags#HITMASTER]HITMASTER[/wiki] flag on the projectile, and use [wiki]A_ChangeVelocity[/wiki] with the desired Z velocity value while passing AAPTR_MASTER as the ptr parameter.
Re: Projectile that gives a monster Z-Velocity?
Oh sweet, thank you so much! Works perfectly.
I looked at the actor pointers and "AAPTR_LINETARGET" also seems to work even when HITMASTER is not set.
I looked at the actor pointers and "AAPTR_LINETARGET" also seems to work even when HITMASTER is not set.
-
- Posts: 4949
- Joined: Sun Nov 14, 2010 12:59 am
Re: Projectile that gives a monster Z-Velocity?
I can't tell you anything about AAPTR_LINETARGET in this case. So unless you get confirmation that it's fine to use, I'd recommend that you stick with the HIT flag method.