I'm trying to make a ship dock by clicking dock and then clicking the dock you want to dock to. How do I do this?
Type shipdockerdock Field mesh Field dockedTo End Type Type shipdockership Field mesh Field dockedTo Field side End Type starttime = MilliSecs() While Not KeyHit(1) ;Update Water frame stuff If FindDocker = 3 Then If CameraPick(camera,MouseX(),MouseY()) > 0 And MouseHit(1) Then For thisTie.shipdockership = Each shipdockership If thisTie\side = 1 Then thisTie\dockedTo = PickedEntity() EndIf Next EndIf EndIf UpdateWater() UpdateWorld RenderWorld For thisTie.shipdockership = Each shipdockership If thisTie\dockedTo > 0 Then Line3d(camera,EntityX(thisTie\mesh),EntityY(thisTie\mesh),EntityZ(thisTie\mesh),EntityX(thisTie\dockedTo),EntityY(thisTie\dockedTo),EntityZ(thisTie\dockedTo)) EndIf Next ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;Code For Ship Docker Window;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; If Windows(1,3) = 1 Then DrawImage Windows(1,0),Windows(1,1),Windows(1,2) If MouseX() => Windows(0,1) And MouseY() => Windows(0,2) Then If MouseX() =< Windows(0,1) + 20 And MouseY() =< Windows(0,2) + ImageWidth(Windows(0,0)) Then If MouseDown(1) Then Windows(1,1) = MouseX() Windows(1,2) = MouseY() EndIf EndIf EndIf If MouseX() => Windows(0,1) + 16 And MouseY() => Windows(0,2) + 56 Then If MouseX() =< Windows(0,1) + 48 And MouseY() =< Windows(0,2) + 107 Then If MouseDown(1) Then ;Select Front Hookup FindDocker = 1 EndIf EndIf EndIf EndIf