Raised This Month: $ Target: $400
 0% 

Bug when setting entity origin?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Tirant
Veteran Member
Join Date: Jul 2008
Location: Los Angeles, California
Old 12-05-2012 , 00:28   Bug when setting entity origin?
Reply With Quote #1

I don't think I mention this later on, all entities are BRUSH entities.

I've been playing around with a mod that moves entities around by holding your IN_USE key and also has an additional feature that gives information about an entity you're looking at. The problem is, when I stop moving the entity and reset the origin to the original location, the entity for whatever reason is completely unselectable. I've trued changing various things within my code, and when I disable origin changing, it works fine. I was wondering if this was a known bug that someone had experienced before and maybe solved. Also, is_valid_ent(ent) returns 0 still.

I've tried a few different things so far, and I've noticed that the entities only become unselectable when they pass through a func_wall area (I'm using this as a zone for the mod). I've tried leaving them in, dropping them in and taking them out, or just "dipping" them in, all giving me the same results. Thanks for any help/ideas.

I've been able to narrow the problem down to the fact that my "zone" is SOLID_NOT. I am going to try and find a way to make it so that players will interact with it as a SOLID_NOT entity, but the "zone" must be solid to other things. Additionally, the entities when they move back seem to only visually there, not physically (they're non-solid and my plugin doesn't touch their solidity). I also confirmed this by checking the grab and drop solid, movetype and contents of the entity.

Just in case someone else encounters this problem, it turns out that using entity_set_vector(ent, EV_VEC_origin, Floatrigin); does not work correctly. You should use entity_set_origin(ent, Floatrigin); instead
__________________

PM me if you're interested in buying the Credits addition for Base Builder
Battlefield Rebirth [66% done]
Call of Duty: MW2 [100% done]
Base Builder [100% done]

Last edited by Tirant; 12-06-2012 at 03:07.
Tirant is offline
Tirant
Veteran Member
Join Date: Jul 2008
Location: Los Angeles, California
Old 12-05-2012 , 16:58   Re: Bug when setting entity origin?
Reply With Quote #2

I gave up. It's beyond me how to fix this, so I'm going with the more rudimentary approach of making a info_target with a BBOX which I will use to track things entering/within/exiting. This is a very interesting glitch though and I'm not sure where the problem is, whether it's with AMXX traceline or the goldsrc engine itself.
__________________

PM me if you're interested in buying the Credits addition for Base Builder
Battlefield Rebirth [66% done]
Call of Duty: MW2 [100% done]
Base Builder [100% done]
Tirant 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 08:44.


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