Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   gettileset() (https://forums.graalonline.com/forums/showthread.php?t=134257195)

sssssssssss 12-04-2009 11:34 PM

gettileset()
 
How do you use this to pull a certain tileset? b/c putting one with or without quotes doesnt work, and its not loading any of them on the server its on, just pics1.png. If that cant be used, what could you do to substitute for that?

Switch 12-04-2009 11:41 PM

It's used to get the main tileset being used at the moment.
PHP Code:

//#CLIENTSIDE
function onCreated() {
  
removetiledefs();
  
addtiledef("mytileset.png", "", 0);
  echo(
gettileset());
} 

Would return mytileset.png.

sssssssssss 12-04-2009 11:49 PM

Well we were using that on an online editor, so its in a diff wep, dont think that would work right, more of a setimg and gettileset() is in that.

sssssssssss 12-05-2009 12:02 AM

example:
PHP Code:

showimg(202, gettileset(), this.conv_tcx + 16, this.conv_tcy + 16); 

its not getting the current tileset on the level or the main one the server uses, only pics0.png.
tried
PHP Code:

gettileset(armageddon-sde-tileset1.gif) 

and
PHP Code:

gettileset("armageddon-sde-tileset1.gif") 

too

Switch 12-05-2009 12:05 AM

It has no parameters needed.

Edit:
addtiledef2() tilesets won't be read by gettileset().

sssssssssss 12-05-2009 12:18 AM

Switch says addtiledef2 was interfering, in case anyone else runs into this.

DustyPorViva 12-05-2009 12:22 AM

gettileset() only grabs the main tileset being set(addtiledef). Addtiledef2's are rendered separately, on a 'layer' above the main tileset, rather than actually being inserted into it. There is currently no simple way to manage all the addtiledef2's, however, but it's been suggested before.

Switch 12-05-2009 12:30 AM

Quote:

Originally Posted by DustyPorViva (Post 1542502)
gettileset() only grabs the main tileset being set(addtiledef). Addtiledef2's are rendered separately, on a 'layer' above the main tileset, rather than actually being inserted into it. There is currently no simple way to manage all the addtiledef2's, however, but it's been suggested before.

Maybe gettilesets() which returns in an array a 1 for the main tileset followed by the image, and a 2 for all addtiledef2's followed by the image. Or gettileset2() which returns all addtiledef2's.

Admins 12-05-2009 12:32 AM

gettileset() only returns the main tileset (addtiledef), not parts (addtiledef2).
It's calculating the image and offset for each tile when drawing it. There is currently no way to get the current tile sets except by drawing them on a drawing panel ("TILES")

DustyPorViva 12-05-2009 12:33 AM

Quote:

Originally Posted by Switch (Post 1542504)
Maybe gettilesets() which returns in an array a 1 for the main tileset followed by the image, and a 2 for all addtiledef2's followed by the image. Or gettileset2() which returns all addtiledef2's.

Well, I've suggested that the current visible tileset(compilation of the main and secondary) be flattened into a panel image, and thus with another suggestion to be able to access panel images via panel.image, easily accessible.


All times are GMT +2. The time now is 11:19 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.