how do write an if command where
if entity one hits entity2 then entity2
SetCollisionGroup( COLLISION_GROUP_WORLD )
Can you be more specific? If they are two seperate entity classes then just:
[lua]
//Entity1's touch
function ENT:Touch(ent)
if ent:GetClass() == "class_of_entity2" then
ent:SetCollisionGroup( COLLISION_GROUP_WORLD )
end
end
[/lua]
[QUOTE=Gryphian;32272038]Can you be more specific? If they are two seperate entity classes then just:
[lua]
//Entity1's touch
function ENT:Touch(ent)
if ent:GetClass() == "class_of_entity2" then
ent:SetCollisionGroup( COLLISION_GROUP_WORLD )
end
end
[/lua][/QUOTE]
yea they where 2 separate entity classes. thank you!
Sorry, you need to Log In to post a reply to this thread.