prolly most complex code here i've made
-
Reads a multiline text file, extracts its contents into a list, and then makes a 3d character avatar item for each content by getting information about each content from a table. Doesn’t work entirely yet, but it is going to be very useful and good when done for my game -
@jeffreyrb03-gmail Nice
-
@jeffreyrb03-gmail i simplified it and made it actually work using a block
-
@jeffreyrb03-gmail Good for you
-
@jeffreyrb03-gmail This has now been near perfected, since it works and does what it’s supposed to. I just have to make it so it can support shoes, and it’ll be awesome!
-
@jeffreyrb03-gmail What is this for? What does it do? Can you simplify the explanation for me?
-
@011830-0a42ef84 I got help fixing an error in it from Tyller ( in https://www.forum.creaticode.com/topic/1534/feature-request-eval-like-block/5 ), basically it reads a text like “jacob#santa-hat” and splits it into a list (would have 2 items in this case), and it adds the player (the base, which is “jacob”) and then parses every item after that, it gets information about that item from a table, and then uses that information to make your avatar wear that item.
Right now, the Santa hats rotation is messed up so don’t pay that any mind. After all this code is executed, here is the result:
It uses both community/user uploaded models AND the models that come with CreatiCode, which is why it has to check if its corresponding id in the table starts with “M:”, and the table also provides other valuable information, like the rotation of items, their size, etc.It is soon going to be more complex to support shoes, both left and right, and attaches them to the feet.
Edit: the original code looks like this now:
-
@jeffreyrb03-gmail Are you saying you are trying to make custom hats?
-
@011830-0a42ef84 not just hats, could be anything like glasses too, but shirts and pants will be a little harder because I’ll need to add animations of moving to go along with the character so that you don’t see the player’s leg going through the pants instead of the pants looking like they’re attached to the player