[help] entity front
i have 2 entities and i need to detect a third entity touch, from forward only if the third entity touch from background just put a invisible wall to block only the third entity:
view pic. if E3 touch E1/E2 from back = Block if E3 touch E1/E2 from front = Print chat message my question is how can i detect from where did he touch E1/E2. from front or back http://i53.tinypic.com/33n9k3r.png |
Re: [help] entity front
Are E1/E2 players?
|
Re: [help] entity front
none of them are players
Edit: S1 / S2 are SOLID_TRIGGER. detect touch isn't a problem, the point is how can i detect from where did E3 touch E1 or E2 |
Re: [help] entity front
Just do an origin check.
It will require some testing unless you know the directions of the entities. |
Re: [help] entity front
the directions isn't always the same. I tried several times , but i guess another try wont hurt
|
Re: [help] entity front
If the entities can move, you can check their angles to see if it is the front/back.
Otherwise, they would be in the same position/direction all the time so you would just need to check origins. |
Re: [help] entity front
Quote:
|
Re: [help] entity front
What type of entities are you trying to detect?
|
Re: [help] entity front
e1 and e2 are nets.
Code:
ent = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target")) |
Re: [help] entity front
If the map does not already have solid goals (walls/nets around a box to make a soccer (or futbol) goal), then you could create solid entities around the SOLID_TRIGGER entities such that the ball can only touch from one side.
|
| All times are GMT -4. The time now is 20:07. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.