"Parry" mechanic ((Sort of fixed))

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

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!)
User avatar
Niphura
Posts: 192
Joined: Fri Jun 16, 2017 3:07 pm
Location: Argentina

Re: "Parry" mechanic (Help)

Post by Niphura »

I don't know i'm trying some things, sorry, what I mean with purple is that you can see that hitowner is not colored

i was planning to do a projectile fired after a melee attack (from the enemy) that bounce on the shield and hits the enemy who fired it. But i don't know how to do a projectile do damage to his owner
Attachments
Sin título.png
Sin título.png (2.11 KiB) Viewed 472 times
Last edited by Niphura on Wed Feb 06, 2019 8:52 am, edited 2 times in total.
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

Re: "Parry" mechanic (Help)

Post by Matt »

I'm assuming you're using some kind of program that automatically parses Decorate (and *maybe* ZScript). I'm not familiar with them because I just use regular text editors for this stuff, but +HITOWNER is very new and may not be recognized by the program.

Please read about the flags for a bit. +HITOWNER is unfortunately named and does not behave the same way as the other +HIT* flags.

Reading up about the action functions will be very helpful as well.
User avatar
Niphura
Posts: 192
Joined: Fri Jun 16, 2017 3:07 pm
Location: Argentina

Re: "Parry" mechanic (Help)

Post by Niphura »

I'm using Slade
User avatar
Niphura
Posts: 192
Joined: Fri Jun 16, 2017 3:07 pm
Location: Argentina

Re: "Parry" mechanic (Help)

Post by Niphura »

I've managed to make a similar effect, the enemy melee hits and it launches a invisible projectile with a custom damage type (that doesn't hurt the player if he doesn't cover with the shield and the enemy melee hits him) when the player covers the projectile bounces and hits the enemy, sending him to a custom pain state (stunned state).
The only problem that i've found is that when you're very close to the enemy the projectile doesn't reflects, it explodes and causes no damage at all, so you have to take a step back and then it works.
Last edited by Niphura on Wed Feb 06, 2019 8:51 am, edited 1 time in total.
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

Re: "Parry" mechanic (Help)

Post by Matt »

sounds like a feature... opponent managed to close in past the shield :P
ZzZombo
Posts: 317
Joined: Mon Jul 16, 2012 2:02 am

Re: "Parry" mechanic ((Sort of fixed))

Post by ZzZombo »

All projectiles are destroyed instantly if there is no room for them on spawn.
User avatar
Niphura
Posts: 192
Joined: Fri Jun 16, 2017 3:07 pm
Location: Argentina

Re: "Parry" mechanic ((Sort of fixed))

Post by Niphura »

I didn't know that...do you know a way so they don't explode?
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

Re: "Parry" mechanic ((Sort of fixed))

Post by Matt »

Why not just A_SpawnItemEx a shootable actor that isn't a projectile?

EDIT: A while ago I wrote this tutorial for a lingering directional shield. A parry is basically the same thing except the shield only lasts a few ticks.
Post Reply

Return to “Scripting”