ReFLeX
2006-04-01 16:19:28
Can someone explain how to use DTMs and Arrays, also a tut would be helpful.
The Un-Named
2006-04-02 04:23:39
OMFG WHAT IS IT WITH SRL AND DELETING YOUR MESSAGE?!!!
SCAR -> Tools -> DTM Editor.
A new box will come up. See the 3 X 3 pixel box inside the red one? That's where we choose the color and coords.
http://img81.imageshack.us/img81/3114/13pj2.pngBasically, click the black line surrounding a rs item in 4-5 places, then you can either A. Save(File -> Save) and then test the DTM to see if there are any more DTM's that match the one you found(Test -> Show matching pixel's) or B. DTM to text, if you know there aren't, or have tested it already.
Use the DTM as a BMP, but FindDTM(…) insted of FindBitMap(…).
phantombmx
2006-04-02 19:05:55
From: The Un-Named
OMFG WHAT IS IT WITH SRL AND DELETING YOUR MESSAGE?!!!
SCAR -> Tools -> DTM Editor.
A new box will come up. See the 3 X 3 pixel box inside the red one? That's where we choose the color and coords. http://img81.imageshack.us/img81/3114/13pj2.png
Basically, click the black line surrounding a rs item in 4-5 places, then you can either A. Save(File -> Save) and then test the DTM to see if there are any more DTM's that match the one you found(Test -> Show matching pixel's) or B. DTM to text, if you know there aren't, or have tested it already.
Use the DTM as a BMP, but FindDTM(…) insted of FindBitMap(…).
ahah! ty! now i can figure out dtms.. lol
masquerader
2006-04-02 19:42:48
yay, arrays!!!!
arrays are awesome, you can make arrays to store anything, like integers, strings, or even arrays of buttons on a form (ive done it)
arrays have a length, and if you try to write outside of the range, you will get "out of range" errors- duh
there's two types of arrays, static and dynamic
you set up a static array by using:
var
arrayname:array[0..2] of integer;
in this case, you have an array of 3 integers:
arrayname[0]
arrayname[1]
arrayname[2]
the number in the [ ] is called an index and you can assign a value to it by doing:
arrayname[0]:=512879;
dynamic arrays are way cooler
you set them up by doing
var
arrayname: array of integer;
now dynamic arrays are initialized with a length of 0, so you need to use
setarraylength(array, length);
to give it a length to store stuff in
the first index is always 0 with dynamic arrays, but with static ones you can start where ever
the players in SRL are set up using arrays, so you can look how that works
also, there are arrays with multiple values per index (ex tpointarray) and arrays with multiple indexes per value (multi-dimensional), but i'll see how this lil tut goes first
hope that helped