Recoil2?

Moderator: GZDoom Developers

User avatar
DBThanatos
Posts: 3101
Joined: Fri Apr 14, 2006 3:17 pm
Location: in "the darkness that lurks in our mind"
Contact:

Recoil2?

Post by DBThanatos »

if already in, somebody please tell me how to

like i saw in EDGE, when you fired a weapon, the camera moves alittle bit vertically, giving the feeling that you just fired a really heavy weapon, Could that be added in Zdoom decorate?? for example, when you fire an extremely heavy BFG (or something like that) and it have a recoil, you just feel like something pushed you a little back, but there is no real feeling of power fired...




DBT
User avatar
Nash
 
 
Posts: 17439
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Post by Nash »

I can think of a way to do it, but it's kind of a hack.

The Fire state would start an ACS script.

The ACS script will store the player's pitch the moment it was fired.

Then, the script will increment the player's pitch smoothly. At the end of that, decrease the player's pitch until it is the same as the pitch that was stored earlier.
User avatar
Grubber
Posts: 1031
Joined: Wed Oct 15, 2003 12:19 am
Location: Czech Republic
Contact:

Post by Grubber »

Or just use [wiki]A_Recoil[/wiki], which doesn't move the camera, but pushes you back.
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:

Post by Matt »

You can do that in ACS? Sweet...

::imagines being finally able to implement Infiltration-style recoil into his rifle mod once he ever bothers mapping and/or when global ACS comes out::

EDIT: DB, have you tried putting A_Recoil in the flash state, one positive before and one negative after the flash? It's not that bad if you're standing still, though if you're shooting on the run the effect is negligible...
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

If you just want some view shaking you can try to play around with radius_quake.
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Post by HotWax »

Nash wrote:The ACS script will store the player's pitch the moment it was fired.

Then, the script will increment the player's pitch smoothly. At the end of that, decrease the player's pitch until it is the same as the pitch that was stored earlier.
The big drawback to that is there's no way to tell how the player is interacting with the recoil. Normally when firing these weapons, your natural response is to try to compensate for the back-lash effect by pushing your mouse forward while you fire to readjust your view and stay somewhat level. Because your script doesn't take that into account, you don't give the player an opportunity to correct their viewpoint so they always get the full recoil effect.
User avatar
DBThanatos
Posts: 3101
Joined: Fri Apr 14, 2006 3:17 pm
Location: in "the darkness that lurks in our mind"
Contact:

Post by DBThanatos »

Graf Zahl wrote:If you just want some view shaking you can try to play around with radius_quake.

uhhh... how can i do that in a weapon??


also, i think would be nice if this was implemented in Decorate, because, yes, we can make things with scripts, but, for the people like me that still is trying to understand ACS... well, not good pronostic :(

DBT
User avatar
Kirby
Posts: 2697
Joined: Thu Aug 26, 2004 1:23 pm

Post by Kirby »

Well, I'm doubting that you and other people who currently don't understand ACS that well will have features added to suit your lack of knowledge
User avatar
DBThanatos
Posts: 3101
Joined: Fri Apr 14, 2006 3:17 pm
Location: in "the darkness that lurks in our mind"
Contact:

Post by DBThanatos »

I dont mean to sound agressive but:
if that was the case, then we all should be professional programmers to use the game, if that was the case, the to create monsters or stuff like that we shoudl open the source and edit from there and then each one of us have an unoficcial version of zdoom, i believe that decorate is an easy way to edit things in the game, that was the point of existing, and why not adding something to make it simple to use?? then why exist let's say "A_CustomMissile" if im sure that can be done also with some kind of acs??

I think this feature can be useful if added like A_recoil with a Z value, how much the camera would be moved, also the time to normalize. that is my idea.





DBT
User avatar
MasterOFDeath
... in rememberance ...
Posts: 2024
Joined: Sat Apr 03, 2004 10:58 am

Post by MasterOFDeath »

Graf Zahl wrote:If you just want some view shaking you can try to play around with radius_quake.
Nothing like the room shaking violently and all over the place with a pistol. :P
User avatar
Nash
 
 
Posts: 17439
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Post by Nash »

if that was the case, then we all should be professional programmers to use the game
Life can never be fair.
User avatar
Anakin S.
Posts: 1067
Joined: Fri Nov 28, 2003 9:39 pm
Location: A long time ago in a galaxy far, far away...

Post by Anakin S. »

DBThanatos wrote:
Graf Zahl wrote:If you just want some view shaking you can try to play around with radius_quake.

uhhh... how can i do that in a weapon??


also, i think would be nice if this was implemented in Decorate, because, yes, we can make things with scripts, but, for the people like me that still is trying to understand ACS... well, not good pronostic :(

DBT
Just make a small earthquake that lasts a few milliseconds. You can just do something like this in the action part of a frame in decorate:

Code: Select all

Radius_Quake(9,35,0 /*make sure damrad is 0 or you'll hurt yourself and be disoriented*/,30,0)
Radius_Quake now uses a tid of 0 to originate the earthquake from the activator.
User avatar
wildweasel
Posts: 21706
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): A lot of them
Graphics Processor: Not Listed
Contact:

Post by wildweasel »

Anakin: While your solution might work for charging weapons like BFG's, it is rather dumb looking for most other types of weapons. I tried using your idea on my Mass Driver weapon (turning the duration from 35 to 5). It looked exceedingly stupid.
User avatar
MasterOFDeath
... in rememberance ...
Posts: 2024
Joined: Sat Apr 03, 2004 10:58 am

Post by MasterOFDeath »

wildweasel wrote:Anakin: While your solution might work for charging weapons like BFG's, it is rather dumb looking for most other types of weapons. I tried using your idea on my Mass Driver weapon (turning the duration from 35 to 5). It looked exceedingly stupid.
WW-BNI right? The weapon where the alternate fire damn near forced you into the floor? :lol: I remember that.

Yeah, recoil is something to use sparingly.
User avatar
StrikerMan780
Posts: 485
Joined: Tue Nov 29, 2005 2:15 pm
Graphics Processor: nVidia with Vulkan support
Contact:

Post by StrikerMan780 »

Erm, Radius_Quake isn't in EDGE.

Anyways, I would like this feature, as I need to simulate the kickback effects of doom64's shotgun and chaingun, where it doesn't force you back, but it jerks your camera's pitch back a little, very quickly, but does not affect your aim. (maybe a Action Function Option for it to affect aim, like:)

Code: Select all

States
{
Fire:
SHTG A 0 A_Kick(Amount, Affectaim) So, somthing like A_Kick(5, 1)
SHTG A 7 A_Firebullets(....)
}
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”