Equation For Specific Line Length Needed
#10
Thanks OldMoses. Even though I did use B+'s sword code already. I did modify your code to make following eyes. I might use this on a monster. Smile 
But this also goes in my tool bucket folder for other stuff in the future.
Here is my "Following Eyes" mod: 

Code: (Select All)
'Following Eyes - Code by OldMoses mod by SierraKen
Screen _NewImage(800, 600, 32)
xh% = 350: yh% = 300
xh2% = 450: yh2% = 300
swordlength% = 5
Do
    Cls
    While _MouseInput: Wend
    dx% = _MouseX - xh%
    dy% = _MouseY - yh%
    mag! = _Hypot(dx%, dy%)
    If mag! = 0 Then
        ux! = 0: uy! = 0
    Else
        ux! = dx% / mag! '
        uy! = dy% / mag! '
    End If
    spx! = ux! * swordlength%
    spy! = uy! * swordlength%
    'Line (xh%, yh%)-Step(spx!, spy!) '
    For sz = .25 To 5 Step .25
        Circle (xh% + spx!, yh% + spy!), sz, _RGB32(255, 255, 255)
    Next sz
    For sz = .25 To 5 Step .25
        Circle (xh2% + spx!, yh2% + spy!), sz, _RGB32(255, 255, 255)
    Next sz
    Circle (xh%, yh%), 15, _RGB32(255, 255, 255)
    Circle (xh2%, yh2%), 15, _RGB32(255, 255, 255)
    Circle (400, 325), 100, _RGB32(255, 255, 255)
    Circle (400, 365), 65, _RGB32(255, 255, 255), , , .3
    _Limit 100
    _Display
Loop Until _KeyDown(27)
Reply


Messages In This Thread
RE: Equation For Specific Line Length Needed - by SierraKen - 08-17-2022, 05:19 PM



Users browsing this thread: 6 Guest(s)