Raised This Month: $51 Target: $400
 12% 

Solved Entity disappearing on certain areas in relation to observer


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
taski
New Member
Join Date: Feb 2024
Old 02-22-2024 , 10:13   Entity disappearing on certain areas in relation to observer
Reply With Quote #1

Having an odd issue with entity disappearing on seemingly random, but consistent parts of the map depending on where the observer is. Not sure what's causing it as I haven't worked with entities in this game that much. I've tried a few different methods of creating the entity, different rendermodes and perhaps other things. All seems to have this same effect.

In some maps like dust2 and nuke the entity doesn't actually appear at all.
On a bigger map it does appear but disappears once the observer walks into seemingly random parts of the map, so clearly something is not right.

Here's the function where entity in question is being created:

Spoiler



And here's the thinking function where the entity being moved frame by frame

Spoiler


Sort of similar post was created a week ago (nothing much to see):
https://forums.alliedmods.net/showthread.php?t=346159

Made an attempt to scout some other threads, couldn't quite find anything similar.

Last edited by taski; 02-24-2024 at 09:50.
taski is offline
Phant
Veteran Member
Join Date: Sep 2009
Location: New Jersey
Old 02-24-2024 , 00:40   Re: Entity disappearing on certain areas in relation to observer
Reply With Quote #2

Did you tried to use "cycler_sprite" instead of "info_target"?
Phant is offline
Send a message via ICQ to Phant
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 02-24-2024 , 05:39   Re: Entity disappearing on certain areas in relation to observer
Reply With Quote #3

Try using what phant said or env_sprite. Don't set any rendering or scaling options.
IMO try removing this completely and see what happens and also try to spawn entity with dllfunc_spawn:
PHP Code:
set_pev(entpev_solidSOLID_NOT);
    
set_pev(entpev_scale0.5);
    
set_pev(entpev_renderfxkRenderFxDistort);
    
set_pev(entpev_frame0.0);
    
set_pev(entpev_rendermodekRenderFxDistort);
    
set_pev(entpev_renderamt0); 
__________________
georgik57 is online now
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
taski
New Member
Join Date: Feb 2024
Old 02-24-2024 , 09:47   Re: Entity disappearing on certain areas in relation to observer
Reply With Quote #4


Quote:
Originally Posted by Phant View Post
Did you tried to use "cycler_sprite" instead of "info_target"?
Now I have. That just makes it really laggy, and the same issue persists

Quote:
Originally Posted by georgik57 View Post
Try using what phant said or env_sprite. Don't set any rendering or scaling options.
IMO try removing this completely and see what happens and also try to spawn entity with dllfunc_spawn:
PHP Code:
set_pev(entpev_solidSOLID_NOT);
    
set_pev(entpev_scale0.5);
    
set_pev(entpev_renderfxkRenderFxDistort);
    
set_pev(entpev_frame0.0);
    
set_pev(entpev_rendermodekRenderFxDistort);
    
set_pev(entpev_renderamt0); 
Thanks for the replies, already tried both of these. Whether there was rendering / scaling, DLLFunc_Spawn / DispatchSpawn or not, it makes no difference.
However, looking at hlsdk_const.inc, this was fixed by just setting movetype to 10, it seems to be 0 by default (NONE). I tried 12 before (FOLLOW) and that had the same problem.

But MOVETYPE_BOUNCE fixes this. If you get some unwanted bouncing, MOVETYPE_FLY also works.
If anyone has this problem you can fiddle with different movetypes to see what suits you.

Spoiler


Here's the working function:

Spoiler



Last edited by taski; 02-24-2024 at 19:40.
taski is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:28.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode