Can projectile change monster's 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!)
Can projectile change monster's velocity?
I'm making new small mod, in which you can push monsters away. There is a way to make this thing real, and if yes then how?
Re: Can projectile change monster's velocity?
Ahpiox wrote:I'm making new small mod, which planned feature is pushing monsters away. There is a way to make this thing real, and if yes then how?
- phantombeta
- Posts: 2089
- Joined: Thu May 02, 2013 1:27 am
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: Brazil
Re: Can projectile change monster's velocity?
Patience is a virtue. This is a forum, not instant messaging. Most users aren't online all the time, and even if they are, they might not be able to answer your question.
- Caligari87
- Admin
- Posts: 6174
- Joined: Thu Feb 26, 2004 3:02 pm
- Preferred Pronouns: He/Him
- Contact:
Re: Can projectile change monster's velocity?
You'd probably be interested in setting the ProjectileKickBack property for your projectiles. That does exactly what you're describing. Weapons can also have the Weapon.KickBack property, which does the same for melee / hitscan attacks.
Alternatively you could do it manually via ZSCript by imparting some of your projectile's velocity (or some static velocity) to whatever it hits, which may offer more consistent / controllable results but requires a little more coding.
Alternatively you could do it manually via ZSCript by imparting some of your projectile's velocity (or some static velocity) to whatever it hits, which may offer more consistent / controllable results but requires a little more coding.
Re: Can projectile change monster's velocity?
Does that work for melee attacks as well?Caligari87 wrote:You'd probably be interested in setting the ProjectileKickBack property for your projectiles. That does exactly what you're describing. Weapons can also have the Weapon.KickBack property, which does the same for melee / hitscan attacks.