I dont know why I got an error telling me "entity does not exist" look at some code:
dim hitp(3)
dim hitpx(3)
;----------------------------------------------------------------------
hitp(0)=LoadMesh("savepoint\savepoint.3ds")
PositionEntity hitp(0),500,10,130
hitpx(0)=LoadMesh("savepoint\savepointx.3ds")
PositionEntity hitpx(0),500,10,130
EntityAlpha hitpx(0),0.333
EntityRadius hitp(0),2.5
;------------------------------------------------------------------
hitp(1)=CopyEntity(hitp(0))
hitpx(1)=CopyEntity(hitpx(0))
PositionEntity hitp(1),500,10,30
PositionEntity hitpx(1),500,10,30
;------------------------------------------------------------------
hitp(2)=CopyEntity(hitp(0))
hitpx(2)=CopyEntity(hitpx(0))
PositionEntity hitp(2),600,10,30
PositionEntity hitpx(2),600,10,30
;------------------------------------------------------------------
and the error comes here:
For i=0 To 3
(here)If EntityDistance#(car1,hitp(i))<20
FreeEntity hitp(i)
FreeEntity hitpx(i)
Else If EntityDistance#(car1,hitpx(i))
FreeEntity hitp(i)
FreeEntity hitpx(i)
End If
Next
please help...
dim hitp(3)
dim hitpx(3)
;----------------------------------------------------------------------
hitp(0)=LoadMesh("savepoint\savepoint.3ds")
PositionEntity hitp(0),500,10,130
hitpx(0)=LoadMesh("savepoint\savepointx.3ds")
PositionEntity hitpx(0),500,10,130
EntityAlpha hitpx(0),0.333
EntityRadius hitp(0),2.5
;------------------------------------------------------------------
hitp(1)=CopyEntity(hitp(0))
hitpx(1)=CopyEntity(hitpx(0))
PositionEntity hitp(1),500,10,30
PositionEntity hitpx(1),500,10,30
;------------------------------------------------------------------
hitp(2)=CopyEntity(hitp(0))
hitpx(2)=CopyEntity(hitpx(0))
PositionEntity hitp(2),600,10,30
PositionEntity hitpx(2),600,10,30
;------------------------------------------------------------------
and the error comes here:
For i=0 To 3
(here)If EntityDistance#(car1,hitp(i))<20
FreeEntity hitp(i)
FreeEntity hitpx(i)
Else If EntityDistance#(car1,hitpx(i))
FreeEntity hitp(i)
FreeEntity hitpx(i)
End If
Next
please help...