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

Solved Check if an entity is in another one(or a zone)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
PawnVN
New Member
Join Date: Aug 2018
Old 08-20-2018 , 08:35   Check if an entity is in another one(or a zone)
Reply With Quote #1

Hello. I have been struggling to deal with this problem I've had for days. I am trying to detect when there is an entity of a specific class in a zone and do something with it. More specifically, the entity being an object in a basebuilder map. I tried to do it with register_touch, but that only worked when checking when the player is entering that zone. The so-called zone is a SOLID_TRIGGER entity with cubic form(not spherical). I want the zone to be passable through by players but when an entity is put in it to be returned to it's original position in the map(0, 0, 0). I can't figure out how to do the check.

I also tried the obvious alternative - checking the distance between the origin of the zone and the entity, but for every object on the map it showed the exact same distance. I tried with every possible distance-checking method and it still didn't calculate it properly. Guess the old engine is a bit too hard on the newbies when it comes to origins and positions. If you can enlighten me a bit about that origin problem too I would be very grateful!

Any help is much appreciated!

Last edited by PawnVN; 08-21-2018 at 07:05.
PawnVN is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 08-20-2018 , 13:36   Re: Check if an entity is in another one(or a zone)
Reply With Quote #2

If its for basebuilder you need to check if the entity will be stuck before moving.

Try searching for stuck functions.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 08-20-2018 at 13:36.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
PawnVN
New Member
Join Date: Aug 2018
Old 08-20-2018 , 13:41   Re: Check if an entity is in another one(or a zone)
Reply With Quote #3

Quote:
Originally Posted by Natsheh View Post
If its for basebuilder you need to check if the entity will be stuck before moving.

Try searching for stuck functions.
I get what you mean, but the zone entity is not a solid one but a trigger. And, in addition, the basebuilder plugin I use does not have a stuck check. Isn't there just a way to check an entity entering a trigger? I tried to change the zone to a SOLID_BBOX, but the server crashed as soon as I enter, for some reason.

P.S Nevermind, I figured it out. Bump.

Last edited by PawnVN; 08-21-2018 at 07:01.
PawnVN 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 23:14.


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