Making a Flashbang - Solved -

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!)

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Making a Flashbang - Solved -

Re: Making a Flashbang (questions)

by Niphura » Thu Dec 06, 2018 10:41 am

Caligari87 wrote:For the first: You could spawn a camera at the player's position, angle, and pitch, and put a cameratexture HUDmessage over the screen that slowly fades out. THIS WOULD NOT BE PERFECT, as the camera would still be a "live feed" and you could even potentially see yourself, but it's the only way we have of accomplishing that "afterimage" effect. Something better might be using a postprocess shader to blur or otherwise distort the player's screen while the effect is active.

For the second: You can use [wiki]A_JumpIfInTargetLOS[/wiki] to jump to a state in the grenade only if the player is looking toward it (note this can't use the player's actual FOV because that could cause desyncs, but a generic value like 90 should be fine in most cases). You may need to do some pointer-rearrangement hackery to make sure the grenade's target pointer is actually referring to the player.

Note that this would probably be a lot easier in ZScript instead of DECORATE + ACS as more robust scripting options are available.

8-)

Can A_CheckSight help? i don't quite understand his function

Re: Making a Flashbang (questions)

by Caligari87 » Thu Dec 06, 2018 10:24 am

For the first: You could spawn a camera at the player's position, angle, and pitch, and put a cameratexture HUDmessage over the screen that slowly fades out. THIS WOULD NOT BE PERFECT, as the camera would still be a "live feed" and you could even potentially see yourself, but it's the only way we have of accomplishing that "afterimage" effect. Something better might be using a postprocess shader to blur or otherwise distort the player's screen while the effect is active.

For the second: You can use [wiki]A_JumpIfInTargetLOS[/wiki] to jump to a state in the grenade only if the player is looking toward it (note this can't use the player's actual FOV because that could cause desyncs, but a generic value like 90 should be fine in most cases). You may need to do some pointer-rearrangement hackery to make sure the grenade's target pointer is actually referring to the player.

Note that this would probably be a lot easier in ZScript instead of DECORATE + ACS as more robust scripting options are available.

8-)

Making a Flashbang - Solved -

by Niphura » Tue Dec 04, 2018 11:11 am

I found a easier way to make a flashbang based on Radius and damagetype 8-)

Top