How to make random GUID? Please help!

I can not find an analogue of the function GenerateGUID :neutral_face:

Google how to make GUID in JS or in C#

If I ask on the Open Bullet forum, I’m looking for how to do it using this particular program, what does Google have to do with it?! :man_facepalming:

Like in OB1 use the random string function and read in the block to know what the different flags do

1 Like

A uuid (v4) is done like this:

BLOCK:RandomString
  input = "?h?h?h?h?h?h?h?h-?h?h?h?h-4?h?h?h-8?h?h?h-?h?h?h?h?h?h?h?h?h?h?h?h"
  => VAR @UUID
ENDBLOCK
3 Likes

Thank you for helping out!

AS U CAN SEE

1 Like

OR IN LOLICODE

COPY-PASTE THIS

BLOCK:Script

LABEL:GUID-GEN

INTERPRETER:Jint

INPUT

BEGIN SCRIPT

function uuidv4() { return ‘xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx’.replace(/[xy]/g, function© { var r = Math.random() * 16 | 0, v = c == ‘x’ ? r : (r & 0x3 | 0x8); return v.toString(16); }); }

var GUID = uuidv4();

END SCRIPT

OUTPUT String @GUID

ENDBLOCK

3 Likes