AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Place entity over entity (https://forums.alliedmods.net/showthread.php?t=133234)

GXLZPGX 07-23-2010 07:14

Place entity over entity
 
I would like to place an invisible rectangular object over the inside part of the jail cell door:

http://i27.tinypic.com/34dk5zd.jpg

But not the outside. Any possible way of doing that?

ot_207 07-23-2010 07:25

Re: Place entity over entity
 
Well the main problem that I see here is that you need a function that detects the inside or outside. The simple solution that I can see is to get the spawn positions of the players that are in the cells (terrorists) and try to find the func_door entity that correspond to the the cell door. Using traceline you can check if it is a wall between the spawn point and the door (to determine the door). After you are sure which spawnpoint corresponds with each door. You remember the angles. Using those angles you can determine the inside or outside of the cell.

GXLZPGX 07-23-2010 08:24

Re: Place entity over entity
 
I understand what you're saying completely, but I am very unfamiliar with trace_line

Edit: Don't be afraid to post some links to some examples :)

ot_207 07-23-2010 09:41

Re: Place entity over entity
 
Quote:

Originally Posted by GXLZPGX (Post 1248973)
I understand what you're saying completely, but I am very unfamiliar with trace_line

Edit: Don't be afraid to post some links to some examples :)

I am not posting anything. Look in the code and sniplets page. You will find these tuts:
- Fakemeta and Ham explained functions tut by me.
Here you will understand how TRACELINE works.

wrecked_ 07-23-2010 11:27

Re: Place entity over entity
 
http://forums.alliedmods.net/showpos...30&postcount=6


All times are GMT -4. The time now is 00:11.

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