Raised This Month: $ Target: $400
 0% 

Vectors when 2 objects touch?...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
nick123
BANNED
Join Date: Dec 2006
Old 06-18-2007 , 23:18   Vectors when 2 objects touch?...
Reply With Quote #1

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
nick123 is offline
stupok
Veteran Member
Join Date: Feb 2006
Old 06-18-2007 , 23:21   Re: Vectors when 2 objects touch?...
Reply With Quote #2

Just create a second entity that's the size of the fake door and place it where the fake door is.
stupok is offline
kmal2t
BANNED
Join Date: Apr 2006
Old 06-20-2007 , 03:28   Re: Vectors when 2 objects touch?...
Reply With Quote #3

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?
kmal2t is offline
Greenberet
AMX Mod X Beta Tester
Join Date: Apr 2004
Location: Vienna
Old 06-20-2007 , 04:37   Re: Vectors when 2 objects touch?...
Reply With Quote #4

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
__________________
Greenberet is offline
Send a message via ICQ to Greenberet Send a message via MSN to Greenberet
nick123
BANNED
Join Date: Dec 2006
Old 06-23-2007 , 01:53   Re: Vectors when 2 objects touch?...
Reply With Quote #5

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..
nick123 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 21:25.


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