Monday, April 30, 2012

At last, it's done!

The Rick Santorum dart board is finished. While some cuts were made and the main script was redone from scratch all of five times due to various issues, there is now a working dartboard.

The main cut made was creating an attachment for a dart that attaches to the hand and then disappears part way through the throwing animation. That was mostly due to time constraints as well as my dart projectiles causing lag within a sim which got more than one sandbox owner upset.

The other cut was the quote cycling. Mostly since I was busy learning animation and poseballs. I still managed to import and create my own custom animation which I may reuse if there's ever a need for a football sim since it's thrown overhand bust doesn't have the same overextension that throwing a baseball requires. I could only seem to get random quotes to cycle when used as lines instead of paragraphs and I didn't feel like coding things by paragraph when I was sorting though numerous compiler errors and learning how to both animate and how to use Linden Script at the same time.

As it stands, I tried three different animations for throwing the dart, one of which was left-handed. I eventually had to sort through frames to make the animation the most fluid I could. Getting rid of the projectile/vanishing dart meant that I was able to shorten the delay between when the animation starts and ends which means that I no longer had an avatar standing there like an idiot in intervals that take progressively longer since my darts would clog up the sim with prims.

The dartboard is a linked object with a custom texture made using Photoshop. Again, I could have done better by not allowing certain parts of the bullseye to be erased around the edges. It's only noticeable when viewed in first person up close on a high resolution monitor but I'm a perfectionist and I let little blemishes like that bother me. Sadly I lacked the time to redo the entire texture as it was more important to make a working script for both the dartboard and poseball.

So now without using the Vector function, I tried using the Rot function to rotate my dart as a temporary object that would appear in the board when the poseball was stepped on. Also, just being able to click a box instead of using the Die function was a breath of fresh air. It's still not perfect but it's way better than it was before in terms of performance. The dart no longer attaches to the hand but that's because I'd rather it stay on the dartboard since it looks better in Rick's face and it's not as awkward as having a disappearing dart in your hand that goes nowhere. The dart did eventually have to terminate but that's a minor issue.

Also, spawning a menu with a poseball isn't as hard as I was making it out to be. I'd spend hours staring at my screen trying to get one spawned and then find that it's just one line of code. Getting my rotation perfect was a pain but I eventually managed that after experimenting enough since I had to rotate myself by 90 degrees to the left.

Also, crafting my won poseball was a waste of time and a convoluted mess of code since I didn't know that there was a "standard" model of poseball until two days ago (technically three now). naturally, I swapped my poseball out for the new one and then realized that I forgot to set my poseball to terminate by default leading to my inventory being filled with the same scripted poseball. I fixed the problem after thinking that I'd fixed it and wondering what I did wrong and deleted all of the spares I had.

Still, for a first scripted menu poseball item, I feel that I did pretty good. Especially since most poseball items aren't as complex as what I made which was deceptively complex. I'm looking forward to making more objects, mostly with mesh and selling items. Moreover, I learned that I could program and both create my own code and variables and modify other people's code much easier than i did before in a new language when coding was always something that I struggled with. Actually getting the hang of something, possibly due to the visual component is always a good feeling and having to figure things out for myself when nobody that I talked to knew how to do it was a huge triumph for me.

No comments:

Post a Comment