I keep getting a variable type mismatch... HERE:
-RZ
; load xbow ammo bolt=LoadMesh("textures\xbowbolt.b3d",camera) ScaleEntity bolt,.8,.8,.8 RotateEntity bolt,0,180,0 PositionEntity bolt,2,-2,9 newbolt=CopyEntity(bolt) ; create a type Type mybolt Field entityhandle End Type ; HEALTHwidget health=LoadMesh("textures\healthbar2.b3d",camera) ScaleEntity health,.5,.5,.5 PositionEntity health,-4,-2,4 CameraFogColor camera, 2, 2, 2 CameraFogMode camera,1 Collisions 1,2,2,3 Collisions 1,3,2,3 jumpflag=False j#=1 PlaySound windnoise healthy#=1 While Not KeyDown( 1 ) mxs#=MouseXSpeed()/4 mys#=MouseYSpeed()/4 xa#=(xa#-mxs#)Mod 360 ya#=(ya#+mys#)Mod 360 ;limit up and down looking If ya#>=90 Then ya#=90 If ya#<= -89 Then ya#= -89 MoveMouse GraphicsWidth()/2,GraphicsHeight()/2 RotateEntity camera,ya#,xa#,0 ; ------------------------------------------------------------------------------------- If KeyDown (209)=True Then healthy#=healthy#-.1: ScaleEntity health,healthy#,.5,.5 If KeyDown (201)=True Then healthy#=healthy#+.1: ScaleEntity health,healthy#,.5,.5 If KeyDown( 205 )=True Then RotateEntity camera,0,-5,0 If KeyDown( 203 )=True Then RotateEntity camera,0,+5,0 If KeyDown( 208 )=True Then MoveEntity camera,0,0,-5 If KeyDown( 200 )=True Then MoveEntity camera,0,0,5 If MouseDown (1) = True Then If MouseHit(1) Then If Animating(xbow)=0 Then Animate xbow,3 newbolt.mybolt=New mybolt ;I GET THE MISMATCH JUST BEFORE THIS LINE! newbolt\entityhandle=CopyEntity(bolt) PositionEntity newbolt\entityhandle,x,y,z RotateEntity newbolt\entityhandle,EntityPitch(camera),EntityYaw(camera),0 FlushMouse EndIf If KeyDown ( 15 ) = True Then entity = EntityPick(camera,100) Select entity Case Adoor Animate Adoor,3 : EntityType Adoor,0 Default hh=0 End Select EntityType Adoor,2 If KeyHit( 57 )=True And jumpflag = False jumpflag=True oldtime=MilliSecs() EndIf If jumpflag = True Then TranslateEntity camera,+0,+9,+0 If MilliSecs()>oldtime+1250 Then jumpflag=False x#=EntityX(camera) y#=EntityY(camera) z#=EntityZ(camera) speed#=2 For newbolt.mybolt=Each mybolt MoveEntity newbolt\entityhandle,0,0,Speed# Next ; ---- HOW TO USE GRAVITY y#=y#-8I am confused by the "." as well... I don't see the "." in the type examples in B3D. Type is a little confusing to me!
-RZ