Is there a way to make actors appear invisible to its target

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
Dan_The_Noob
Posts: 872
Joined: Tue May 07, 2019 12:24 pm
Graphics Processor: nVidia with Vulkan support
Contact:

Re: Is there a way to make actors appear invisible to its ta

Post by Dan_The_Noob »

Mini--Joe wrote: The Blank frames work perfectly. It just that when A_Warp is called, you see the side of the gun for a fraction of a second, and I assume that's because the players view is catching up with the position of where they are according to the game, which is slightly ahead in the direction they're moving.
what's the A_Warp for?
User avatar
Void Weaver
Posts: 724
Joined: Thu Dec 18, 2014 7:15 am
Contact:

Re: Is there a way to make actors appear invisible to its ta

Post by Void Weaver »

Mini--Joe wrote:
Spoiler:

I tried using blank sprites for 3 of 16 angles, which gave me the exact effect I wanted; HOWEVER when I straferun backwards and diagonally-backwards, A_Warp warps the actor to where the player will be, which results in flickering of the visible rotations that happen when you're standing on top or very close to an actor.
I guess that your A_Warp parameters\flags are bit unsuitable. So yeah, do you can post screenshot of glitch and source of _Warp?

Without sample of your code I can only assume that the
"A_Warp(AAPTR_POINTER,x,y,z,0,WARPF_NOCHECKPOSITION|WARPF_WARPINTERPOLATION|WARPF_COPYVELOCITY)"
or
"A_Warp(AAPTR_POINTER,x,y,z,0,WARPF_NOCHECKPOSITION|WARPF_WARPINTERPOLATE)" would be the best option and should provide smooth warping toward player.
User avatar
StroggVorbis
Posts: 866
Joined: Wed Nov 08, 2017 4:23 pm
Graphics Processor: nVidia with Vulkan support
Location: Germany

Re: Is there a way to make actors appear invisible to its ta

Post by StroggVorbis »

I sadly can't offer any help, but how about making it like in Duke Nukem 3D, Shadow Warrior & Blood where the pickup sprite of the currently selected weapon is displayed over the adversaries' head?
User avatar
Mini--Joe
Posts: 96
Joined: Sun Jul 27, 2014 10:25 am

Re: Is there a way to make actors appear invisible to its ta

Post by Mini--Joe »

Void Weaver wrote:
Mini--Joe wrote:
Spoiler:

I tried using blank sprites for 3 of 16 angles, which gave me the exact effect I wanted; HOWEVER when I straferun backwards and diagonally-backwards, A_Warp warps the actor to where the player will be, which results in flickering of the visible rotations that happen when you're standing on top or very close to an actor.
I guess that your A_Warp parameters\flags are bit unsuitable. So yeah, do you can post screenshot of glitch and source of _Warp?

Without sample of your code I can only assume that the
"A_Warp(AAPTR_POINTER,x,y,z,0,WARPF_NOCHECKPOSITION|WARPF_WARPINTERPOLATION|WARPF_COPYVELOCITY)"
or
"A_Warp(AAPTR_POINTER,x,y,z,0,WARPF_NOCHECKPOSITION|WARPF_WARPINTERPOLATE)" would be the best option and should provide smooth warping toward player.

Thank you for the help, the solution was to use the flag "WARPF_INTERPOLATE". Now the actor perfectly mimics the movement of the player, which is exactly what I wanted!

Thank you everyone for your help!
Post Reply

Return to “Scripting”