OpenAI ChatGPT can help with LSL scripting!

Introduction:

ChatGPT is a powerful language model developed by OpenAI that is capable of generating natural language text based on a prompt. In this blog post, we will explore how ChatGPT can be used to write code in the Linden Scripting Language (LSL) for use in Second Life, a popular virtual world platform.

Using ChatGPT for LSL Code Generation:

One way to use ChatGPT for LSL code generation is to provide it with a series of prompts that outline the desired functionality of the code. For example, if you want to create an object that says “Hello” when touched, you might provide ChatGPT with the following prompt:

“Write an LSL script for an object in Second Life that says ‘Hello’ when touched.”

ChatGPT will then generate a script based on this prompt, which you can use as a starting point for your project. You can then fine-tune the generated code as needed to achieve the desired behavior.

ChatGPT response:

Alternatively, you can use ChatGPT to generate code snippets for specific tasks, such as handling touch events or setting an object’s velocity. For example, you might provide ChatGPT with the following prompt:

“Write an LSL function for handling touch events in Second Life.”

ChatGPT will then generate a function that you can use in your LSL script to handle touch events. You can then use this function to trigger other actions, such as making the object say “Hello” or moving it to a new location.

Benefits of Using ChatGPT for LSL Code Generation:

Using ChatGPT for LSL code generation has several benefits. First and foremost, it can save you a lot of time and effort by generating code for you automatically. This is especially useful if you are new to LSL or are working on a complex project with many different components.

In addition, ChatGPT can help you learn more about LSL programming by providing you with code examples and explanations of different concepts. This can be especially useful if you are struggling to understand a particular concept or are looking for ways to implement a specific feature.

Finally, ChatGPT can help you explore new ideas and approaches to LSL programming by generating code for you automatically. This can be a great way to experiment with different ideas and see what works best for your project.

Example:

I typed in this prompt, “Write code using lsl to make an object hop and move within a 10 m range.”

ChatGPT response:

I tested out the above example and I did get a script error. The problem was in the final line of code, llSetVelocity(velocity, 1.0);

The llSetVelocity function requires a vector, which was correctly defined in a variable named “velocity”, followed by an integer. The program typed 1.0, which was interpreted as a float. I changed that from 1.0 to 1, and the program compiled and ran. Every time I touch the cube I put the script into, it moves some random amount.

Conclusion:

In conclusion, ChatGPT is a powerful tool that can be used to generate code in the Linden Scripting Language for use in Second Life. Whether you are a seasoned LSL programmer looking for ways to streamline your workflow or a beginner looking to learn more about LSL programming, ChatGPT can help you achieve your goals faster and more efficiently.

In addition to writing code, ChatGPT can even write blog posts. I gave it this prompt, “Write a blog post explaining how chatgpt can be used to write code using lsl for second life.” You can see the result here, in this post. I added to it, but the bulk of this post was generated by ChatGPT.

It is free! Here is where to go to try it out.

https://openai.com/blog/chatgpt/

Black Rose Racing Tarns

By several requests, here they are for sale in six colors!

Get it on the Marketplace!

Get it on the Marketplace!

Get it on the Marketplace!

Get it on the Marketplace!

Get it on the Marketplace!

Get it on the Marketplace!

Land Impact: 12 prims

Designed for racing, highly maneuverable and easily controlled. Fly in mouselook and steer with your mouse.

**Race track and scoreboard NOT included.
**No combat meter, designed for racing, not combat.

Black Rose Tolling Bell

Land impact: 6 prims. The bell is animated to move and ring out the hour on the hour. You can ring the bell in between by left clicking on it.

Warning: Unlinking and relinking the bell can break the animation and cause it to no longer work.

Get it on the Marketplace!

Black Rose Cutting Board

Here is my latest! Created with the medieval kitchen in mind, this board would fit into any kitchen of any period. Touch the board and a dialog box gives you a choice of bread dough to knead or vegetables to chop. Both animate your avatar to knead or chop, and the veggies give you a knife to “add” to your hand. The veggie board also plays a chopping sound when an avatar is chopping vegetables.

The board and contents are made of 100% mesh. The board alone is 1 prim. The bread dough consists of 7 prims and the veggies 11 prims. After 30 minutes of non-use, the board clears itself to assist with prim management on your land.

You can get it in the marketplace.

New Christmas Items

To help you decorate your home in Second Life, or to give as gifts to friends, we have two new Christmas releases this year.

Get it at the Marketplace.

You get a lovely turkey, roasted to perfection, served on a bed of lettuce on our very best china platter. It will look lovely on your table and as part of the setting for your Christmas photos.

If you (or your guest) touch the turkey, it gives you a serving turkey. You “wear” the turkey to serve it. Logic would suggest that you would be animated to carry the tray. Well, you can’t always count on logic with things I make. You wear the turkey, and an uncooked version of it attaches itself to your head. You stumble about blindly, waving your arms. You can “serve” it yourself for comedic effect, or if you wish to play a prank on a friend, ask him or her to touch the turkey to get the serving turkey and serve it.

Get it at the Marketplace.

This is a carefully sculpted and textured sprig of mistletoe tied up with a red ribbon to hang in your home. Once a minute a sensor checks to see if anyone is standing beneath it. If an avatar is found, the mistletoe announces that he or she is beneath the mistletoe and needs to be kissed.

I wish all of my friends, family, customers, followers and well wishers a Merry Christmas and Happy New Year.

Naughty Christmas Wishes

It is that time of year once again! If you like to decorate with an, um, edge, this is just the thing for you! Click on the globe to shake things up.

Warning: The snow may not fly but you will get shaken up by this naughty snowman. Adult animations are involved. Enjoy!

Black Rose/Good Mojo 32 Man Tournament & Prize Boards

Maverick Schism, owner of Good Mojo, and I have collaborated on a few projects now and continue to work together. Our 16 man tournament board has proven to be a popular item, and we were often asked if we had a 32 man version of the board available.

We are pleased to release a 32 Man Tournament and Prize Board.

– up to 32 entrants
– boards designed to handle byes in fairest way possible
– board rezzed for the correct number of entrants from 8 to 32 (less than 8 on 8 man board)
– board can be reopened after closing without entrants having to re-enter
– admins can easily remove entrants or add entrants by name
– admins configured easily by notecard

Prize boards can be rezzed to display sponsors and calculate prize break down for one prize, two prizes (60/40), or three prizes (50/30/20).

Hunting System

If you are wondering why I have not put out anything new for a little while, it is because Maverick and I are hard at work on a hunting system. It is a large project. The animals are sculpted, animated and move about, with animations for various states such as idle, walking, running, attack, sleeping and dying. The system will give you experience points, which move you up in level. There will be reward items given at various levels, and there will be occasional loot dropped by animals you kill as well. Here is a sneak peek at some of the animals. We are working towards a goal release date in the early fall.

Miscellaneous Gadgets

In addition to making clothing, I make miscellaneous scripted gadgetry. Recently I have been collaborating with Maverick Schism whose store name is Good Mojo. Whenever you see the two logos together, Black Rose and Good Mojo, you will know that two minds have meshed to create that product. Here are some of the gadgets produced by myself and with Maverick. Check out my main store in world to see more.