Yup. I have another problem.
I have a code that I got from someone on this sight and I have implemented it into a project of mine.
Here is the code:
When I press the space bar, it points to "Dx# = EntityX( foe\shape ) - EntityX( missile )" and says "Entity Does Not Exist".
I think it knows the missile is there so I'm guessing it's the foe\shape (I could be wrong).
So what am I to do?
I have a code that I got from someone on this sight and I have implemented it into a project of mine.
Here is the code:
Graphics3D 1024,764 SetBuffer BackBuffer() missile=CreateCone() PositionEntity missile,EntityX(cam,1),EntityY(cam,1),EntityZ(cam,1) ScaleEntity missile,.5,1,.5 RotateEntity missile,EntityPitch(cam,1),EntityYaw(cam,1),EntityRoll(cam,1) ;Creating the targets Type target Field count Field shape Field health End Type For x=1 To 5 For z=1 To 5 foe.target=New target foe\count=25 foe\health=3 foe\shape=CreateCube() ScaleEntity foe\shape,2,2,2 PositionEntity foe\shape,Rand(-450,790)+x*5,60,Rand(-600,750)+z*5 EntityTexture foe\shape,l NameEntity foe\shape,Handle(foe) Next Next While Not KeyDown(1) If KeyDown(57) Then MoveEntity missile,0,.3,0 ;get vector to target Dx# = EntityX( foe\shape ) - EntityX( missile ) Dy# = EntityY( foe\shape ) - EntityY( missile ) Dz# = EntityZ( foe\shape ) - EntityZ( missile ) ;align missle to target vector AlignToVector missile, Dx, Dy, Dz, 2, .09;.05 EndIf RenderWorld Flip Wend End
When I press the space bar, it points to "Dx# = EntityX( foe\shape ) - EntityX( missile )" and says "Entity Does Not Exist".
I think it knows the missile is there so I'm guessing it's the foe\shape (I could be wrong).
So what am I to do?