EntityDistance между обьектами одного типа
type chel
field c_pivot; сфера !!
field c_entity; модель, которая прикреплена к c_pivot !!
end type
ВАРИАНТЫ:
if EntityDistance(s\c_entity,s\c_pivot) < 100 then
...
endif
if EntityDistance(s\c_entity,s\c_entity) < 100 then
...
endif
if EntityDistance(s\c_entity,s\c_entity) < 100 and EntityDistance(s\c_pivot,s\c_pivot)<10 then
...
endif
ну, еще много таких же привести !!
ПРОБЛЕМА:
заключается в том что когда
for s.chel = each chel
.....
next
то EntityDistance ищется для одного и того же обьекта типа !!
т.е. вот это:
if EntityDistance(s\c_entity,s\c_pivot) < 100 then
...
endif
означает условие при которое будет True когда pivot обьекта и его модель будут на дистанции меньше 100, т.е. оно всегда True !!
Ваши идеи по этому поводу ??
|