Blockland Forums > Modification Help
sha1
(1/5) > >>
cheese6:
Oh my god, I just was looking through the Teledoor script to make my Security Camera script
and this is what i saw

--- Code: --- getSubStr(sha1(%obj.getTransform()), 0, 5);
--- End code ---
Am i late or what :o
MegaScientifical:
I don't understand what you need help with. Could you rephrase the question?

It probably just adjusts the numbers a little to be more normal, probably insignificant.
Uristqwerty:
Sha1 is a cryptographic hash. In this case, it is using the first 5 characters of a hash of the position vector, probably as a unique identifier of something.

I suspect that it is implemented in the engine and is already used in the updater, so re-using it was the most convenient option, requiring no additional code for an acceptable result.
MegaScientifical:
No no, there's no other variables besides the transform in the command. The 0 and 5 are for getSubStr.
Ipquarx:

--- Quote from: MegaScientifical on November 29, 2011, 08:21:01 PM ---The 0 and 5 are for getSubStr.

--- End quote ---

--- Quote from: Uristqwerty on November 29, 2011, 08:08:56 PM ---using the first 5 characters of a hash of the position vector
--- End quote ---
I don't understand why you corrected him.

I think this would make more sense if you actually told us more speciffically what the question is, because right now it just looks like your saying that this function exists and that you're surprised.
Navigation
Message Index
Next page

Go to full version