findimg() is listed in the serverside script functions.
I always use findimg() now because I don't want to alternate between two days of doing the same thing. findimg() works for the simple and the complex and is much more readable.
Quote:
Originally Posted by Tolnaftate2004
showimg() is decidedly a function with a return value; it was not so in GS1.
|
There would have been no point for it returning an object in GS1. Also making it return the image object in GS2 was a good move.
So theres now 3 ways to do the same thing:
PHP Code:
// GS1
showimg(1, "light3.png", x - 3.5, y - 3);
changeimgcolor(1, 1, 0.4, 0, 0);
changeimgvis(1, 3);
// Half GS2
with (showimg(1, "light3.png", x - 3.5, y - 3)) {
red = 1;
green = 0.4;
blue = 0;
alpha = 0;
layer = 3;
}
// Full GS2
with (findimg(1)) {
image = "light3.png";
x = thiso.x - 3.5;
y = thiso.y - 3;
red = 1;
green = 0.4;
blue = 0;
alpha = 0;
layer = 3;
}