Blockland Forums > Modification Help

First shot at packages, failed miserably. [Solved, by me]

Pages: (1/1)

Lugnut:

This is the add-on I'm trying to modify - http://forum.blockland.us/index.php?topic=183925.0
I'm attempting to make the green part (currently under the tool slider) be anchored next to the paint slider.

Using packages, I had hoped to make the green part slide out with the paint, and then slide back in when the paint slider goes in, so that both were always visible. The best result I've managed to achieve is the green part twitching, and the paint slider functioning normally.

I am very newby when it comes to packages, help please!

--- Code: ---package PaintCanGlideSupport
{
function playgui::hidepaintbox(%this, %distance, %number, %numberother)
{
if(%distance < 0)
GPScounter.position = (%distance SPC (getWord(getRes(),1) - 80) + getWord($Pref::GPSCounter::posadd,1));
if(%distance > 0)
GPScounter.position = ("-15" SPC (getWord(getRes(),1) - 80) + getWord($Pref::GPSCounter::posadd,1));
parent::hidepaintbox(%this, %distance, %number, %numberother);
echo(%this SPC %distance SPC %number SPC %numberother);
}
};
activatePackage(PaintCanGlideSupport);
--- End code ---

EDIT:Visual reference: should move to . This example was obviously manually doctored..

EDIT2:The debug ECHO I have up there returns this:
--- Code: ----open-
PlayGui -91 1 0
4352 -91 1 1
-close-
PlayGui 91 10 0
4352 91 10 1
4352 91 10 2
4352 91 10 3
4352 91 10 4
4352 91 10 5
4352 91 10 6
4352 91 10 7
4352 91 10 8
4352 91 10 9
4352 91 10 10
--- End code ---

As it would turn out, it was getting reset because I had a loop in the script resetting it. Facepalm.jpg

jes00:

So your all good now?

Slicksilver:


--- Quote from: jes00 on February 05, 2012, 06:49:53 AM ---So your all good now?

--- End quote ---
[Solved, by me]

I'd think so, yeah.

Pages: (1/1)

Go to full version