SRL Archive - OSR Help

Tpa cts


Mat

2012-02-11 09:37:08

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

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

nielsie95

2012-02-11 09:44:49

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])

bg5

2012-02-11 12:45:22

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.

masterBB

2012-02-11 13:12:07

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.

NickMystre

2012-02-11 13:29:04

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 ?

masterBB

2012-02-11 13:32:34

From: NickMystre
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 ;)

NickMystre

2012-02-11 13:46:51

@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.

masterBB

2012-02-12 06:08:42

From: NickMystre
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.

From: masterBB
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?