Results 1 to 8 of 8

Thread: Tpa cts

  1. #1
    Join Date
    Nov 2011
    Posts
    1,589
    Mentioned
    9 Post(s)
    Quoted
    17 Post(s)

    Default Tpa cts

    How would I make it so I can put RiftCTS in the ColorSpeedModifer like
    Simba Code:
    SetColorSpeed2Modifiers(RiftCTS);
    Heres the Normal code
    Simba Code:
    0.06, 1.02;
    Heres what I had
    Simba Code:
    Var
      RiftCTS:Integer;

    begin
    RiftCTS := 0.06, 1.02;
    SetColorSpeed2Modifiers(RiftCTS);
    end.
    But get a error how would i get round it I don't want 4 TPA's for different Rifts :P
    Hope you can help.
    Mat



    ^^

  2. #2
    Join Date
    Sep 2006
    Posts
    6,089
    Mentioned
    77 Post(s)
    Quoted
    43 Post(s)

    Default

    TPA stands for TPointArray which stands for array of TPoint. This has nothing to do with the ColorToleranceSpeed. If you want to pass the modifiers stored in an array, just index them..?

    SetColorSpeed2Modifiers(RiftCTS[0], RiftCTS[1])
    Hup Holland Hup!

  3. #3
    Join Date
    Oct 2011
    Posts
    805
    Mentioned
    21 Post(s)
    Quoted
    152 Post(s)

    Default

    Also you can't store floating points in integer as everything after dot will be cutted off. You can use double or extended for it. Only Extended in this case ,because SetColorSpeed2Modifiers needs extended as arguments.

  4. #4
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    Simba Code:
    HueSat= record
        Hue,Sat: extended;
      end;
      HSArray= array of HueSat;

    begin
      setLength(HSArray,4);
      HSArray[0].Hue = 0.2;
      HSArray[0].Sat = 0.4;
      HSArray[1].Hue = 0.4;
      HSArray[1].Sat = 0.5;
      HSArray[2].Hue = 0.6;
      HSArray[2].Sat = 0.2;
      HSArray[3].Hue = 0.4;
      HSArray[3].Sat = 0.9;

      SetColorSpeed2Modifiers(HSArray[0].Hue,HSArray[0].Sat);
      SetColorSpeed2Modifiers(HSArray[1].Hue,HSArray[1].Sat);
      SetColorSpeed2Modifiers(HSArray[2].Hue,HSArray[2].Sat);
      SetColorSpeed2Modifiers(HSArray[3].Hue,HSArray[3].Sat);
    end.
    Working on: Tithe Farmer

  5. #5
    Join Date
    Nov 2011
    Location
    Jozi, South Africa
    Posts
    249
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Smile

    Hi masterBB

    You don't know me and neither do I know you. This is not directed towards you personally, but towards what I feel is a negative practice that will have long term impact on learning scripting @ Villavu.

    I see that you have a tutorial on CTS that is Members+ only ?

    Is this normal ? Surely only entire scripts are classified as Members+ only ?

    I can understand restricting scripts, but not programming concepts like CTS. Surely the idea is to learn ? If someone takes your CTS tutorial and uses it to make / include in a script - that should be considered great, not so ?

    Restricting access to scripts is to prevent leechers running amok that have not contributed to at all and only plunder the loot without paying it forward to the community. (Villavu)

    Restricting access to a tutorial on ColorToleranceSpeed (CTS) seems to me to be unnecessary. It is this the tutorial is about, yes ?

    Do you know which Members I might contact to take this up with them ?
    Ciao
    NM

  6. #6
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    Quote Originally Posted by NickMystre View Post
    Hi masterBB

    You don't know me and neither do I know you. This is not directed towards you personally, but towards what I feel is a negative practice that will have long term impact on learning scripting @ Villavu.

    I see that you have a tutorial on CTS that is Members+ only ?

    Is this normal ? Surely only entire scripts are classified as Members+ only ?

    I can understand restricting scripts, but not programming concepts like CTS. Surely the idea is to learn ? If someone takes your CTS tutorial and uses it to make / include in a script - that should be considered great, not so ?

    Restricting access to scripts is to prevent leechers running amok that have not contributed to at all and only plunder the loot without paying it forward to the community. (Villavu)

    Restricting access to a tutorial on ColorToleranceSpeed (CTS) seems to me to be unnecessary. It is this the tutorial is about, yes ?

    Do you know which Members I might contact to take this up with them ?
    No no, it will be for everyone. First I want to finish it, then I want that all the errors are fixed. I am not an CTS expert, so releasing something that isn't true would be counter productive. Pm me if you want it, or if you want to discuss this. There isn't a restricted tutorial island
    Working on: Tithe Farmer

  7. #7
    Join Date
    Nov 2011
    Location
    Jozi, South Africa
    Posts
    249
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    @masterBB: Then please accept my sincere apologies - I jumped the gun. Good luck with the editing. I look forward to being able to learn from it. Just out of interest - will you also be covering CTS 3 as well ?

    TBH: I feel guilty having tackled you on this - even though it amounted to nothing - because my only contribution I can make to this forum at this stage is to try and assist the very beginners who post requests for scripting help. Most other things are out of my league at the moment, as I have only been around since late November 2011.
    Ciao
    NM

  8. #8
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    Quote Originally Posted by NickMystre View Post
    TBH: I feel guilty having tackled you on this
    No hard feelings . And yes, CTS3 will be discussed in the tut. But let's not derail this thread.

    Quote Originally Posted by masterBB View Post
    Simba Code:
    HueSat= record
        Hue,Sat: extended;
      end;
      HSArray= array of HueSat;

    begin
      setLength(HSArray,4);
      HSArray[0].Hue = 0.2;
      HSArray[0].Sat = 0.4;
      HSArray[1].Hue = 0.4;
      HSArray[1].Sat = 0.5;
      HSArray[2].Hue = 0.6;
      HSArray[2].Sat = 0.2;
      HSArray[3].Hue = 0.4;
      HSArray[3].Sat = 0.9;

      SetColorSpeed2Modifiers(HSArray[0].Hue,HSArray[0].Sat);
      SetColorSpeed2Modifiers(HSArray[1].Hue,HSArray[1].Sat);
      SetColorSpeed2Modifiers(HSArray[2].Hue,HSArray[2].Sat);
      SetColorSpeed2Modifiers(HSArray[3].Hue,HSArray[3].Sat);
    end.
    On topic: Mat, did that answer your question?
    Working on: Tithe Farmer

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
  •