AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Vectors when 2 objects touch?... (https://forums.alliedmods.net/showthread.php?t=56691)

nick123 06-18-2007 23:18

Vectors when 2 objects touch?...
 
ok well im trying to get when a player touchs this wall... i choose to use engine forward register_touch but my problem is, is it possible to kn0w if the toucher touched the the ent at a certian place, in other words i have this realy long wall and i have a door in the middle of it, but it's not classifed as a func_door it's just a part of the wall will it be possible to make that forward work only when this ent touches the door? or if the door was placed into the wall, u had woulda of just had to walk in into it. note* it's not rly a door :) TY in advanced

stupok 06-18-2007 23:21

Re: Vectors when 2 objects touch?...
 
Just create a second entity that's the size of the fake door and place it where the fake door is.

kmal2t 06-20-2007 03:28

Re: Vectors when 2 objects touch?...
 
Couldn't you just make a classname or something for an origin that the player is touching or have a check if they are at a distance of the origin of the player and object that could only mean they're touching?

Greenberet 06-20-2007 04:37

Re: Vectors when 2 objects touch?...
 
if the wall is in the middle of the wall ( e.g. null origin of the wall )
then you could try this:

if vector_lenght(player origin - wall origin) <= door_width/2 then
player is touching the door
end if

nick123 06-23-2007 01:53

Re: Vectors when 2 objects touch?...
 
Green@ no it's just different colors
i know how to create an entitiy but don't know how to make it size thin like a door and large, or do i have to just create like a trigger and just place it at those X origins..


All times are GMT -4. The time now is 21:25.

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