Results 1 to 4 of 4

Thread: Shorten the distance from where Iam to where I want to be

  1. #1
    Join Date
    Oct 2006
    Location
    finland, helsinki
    Posts
    2,501
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default Shorten the distance from where Iam to where I want to be

    How would I do this. I know it's with Sin, Cos and possibly Tan. But as I skipped most of those classes in school, I NEVER LEARNED IT! haha.
    Now I need some help here.

    This is on the minimap. I have 2 points. First point is MMCX, MMCY (Me where iam standing). Then I want to move the second point 5-10 pixels closer to me.



    Code:
    • Narcle: I recall Jukka releasing a bunch of scripts like this before... Its how he rolls I think. rofl
    • Solarwind: Dude, you are like... t3h s3x.
    • Hy71194: JuKKa you're a machine! You released 3 scripts in 10 minutes! :O
    • benjaa: woah.... Jukka is the man Guildminer pwns all
    • NaumanAkhlaQ: And JuKKa Is my Her0!

  2. #2
    Join Date
    Dec 2011
    Posts
    414
    Mentioned
    0 Post(s)
    Quoted
    18 Post(s)

    Default

    Quote Originally Posted by JuKKa View Post
    How would I do this. I know it's with Sin, Cos and possibly Tan. But as I skipped most of those classes in school, I NEVER LEARNED IT! haha.
    Now I need some help here.

    This is on the minimap. I have 2 points. First point is MMCX, MMCY (Me where iam standing). Then I want to move the second point 5-10 pixels closer to me.


    Hey, I am not really understanding the question you said:

    "I want to move the second point 5-10 pixels closer to me"

    You want to move 5-10 pixels closer to point MMCX, or literally move that location 5-10 pixels closer to you?

  3. #3
    Join Date
    Oct 2006
    Location
    finland, helsinki
    Posts
    2,501
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    1st point would be MMCX and MMCY.
    2nd point would be something like a yellow dot anywhere on the minimap.

    What i want to do is move the 2nd point closer to my first point

    Code:
    • Narcle: I recall Jukka releasing a bunch of scripts like this before... Its how he rolls I think. rofl
    • Solarwind: Dude, you are like... t3h s3x.
    • Hy71194: JuKKa you're a machine! You released 3 scripts in 10 minutes! :O
    • benjaa: woah.... Jukka is the man Guildminer pwns all
    • NaumanAkhlaQ: And JuKKa Is my Her0!

  4. #4
    Join Date
    Oct 2006
    Location
    finland, helsinki
    Posts
    2,501
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    NVM, I did this my self.

    Simba Code:
    Function attractPoint(TP: TPoint): TPoint;
    Var
      DeltaX, DeltaY: Integer;
      coeff: Extended;
    Begin
      DeltaX := MMCX  - TP.X;
      DeltaY := MMCY  - TP.Y;
      Coeff := 0.2;
      Result := Point(Round(TP.X + coeff * deltaX), Round(TP.Y + coeff * deltaY));
    End;

    Code:
    • Narcle: I recall Jukka releasing a bunch of scripts like this before... Its how he rolls I think. rofl
    • Solarwind: Dude, you are like... t3h s3x.
    • Hy71194: JuKKa you're a machine! You released 3 scripts in 10 minutes! :O
    • benjaa: woah.... Jukka is the man Guildminer pwns all
    • NaumanAkhlaQ: And JuKKa Is my Her0!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •