Page 1 of 1

Rinkafest.lua

Posted: Mon Mar 14, 2016 6:20 pm
by PixelPest
Yay. This was the first thing I ever made that worked. It pretty much turns all of the coins and coin like items in a level to Rinkas. It executes three simple steps:

1. Find all spawned coin and coin-like NPCs.
2. Turn them into Rinkas.
3. Align them to the 32x32 grid.

It's structured as an API so you can put it in Lua Scripts Lib and load the API into whatever level you feel like messing around in.

Here's what it looks like:
Spoiler: show
Image
Image
Image
https://www.dropbox.com/s/wyznge81lsymc ... t.lua?dl=0

Re: Rinkafest.lua

Posted: Mon Mar 14, 2016 6:23 pm
by Emral
Little fun bit of code. For the future I suggest using onTick rather than onLoop. I don't wanna go too much into detail but onTick is basically a better onLoop.

Re: Rinkafest.lua

Posted: Mon Mar 14, 2016 7:52 pm
by PixelPest
Enjl wrote:Little fun bit of code. For the future I suggest using onTick rather than onLoop. I don't wanna go too much into detail but onTick is basically a better onLoop.
Yep. I should change that. Made this before onTick existed and I just haven't gotten to updating it yet

Re: Rinkafest.lua

Posted: Tue Mar 15, 2016 10:20 am
by PixelPest
Here's the new link: https://www.dropbox.com/s/wyznge81lsymc ... t.lua?dl=0

It replaces all the onLoop event with onTick and has better documentation. All of my links from here forward will now be via Dropbox instead of MediaFire since it's been giving me trouble lately