Graalians

Graalians (https://www.graalians.com/forums/index.php)
-   GraalOnline Era (https://www.graalians.com/forums/forumdisplay.php?f=13)
-   -   Graaleditor changing tileset (https://www.graalians.com/forums/showthread.php?t=1557)

comet graal 10-27-2011 06:32 PM

How to put files that aren't on the tileset on a level.
 
Create an NPC with the following code
PHP Code:

//#CLIENTSIDE

function onCreated()
{
  
setimg("Image file");


I think this is what you do. I know on GS1 the code is setimg, but I don't know what it is for GS2. I checked graal wiki, so it might be
PHP Code:

//#CLIENTSIDE

function onCreated()
{
showimg(integer indexstring filenamefloatxfloaty);


I'm not sure though.

callimuc 10-27-2011 07:28 PM

Quote:

Posted by comet graal (Post 26998)
Create an NPC with the following code
bla
I'm not sure though.

PHP Code:

function onCreated() {
  
setimg("ImageNameHere");


  • Setīs the requested image. Donīt forget to add the prefix.


PHP Code:

function onCreated() {
  
setimgpart("ImageNameHere"startXstartYwidthheight);


  • startX: Where it will start to draw the image at the X coordinates. Itīs counted in pixel.
  • startY: Where it will start to draw the image at the Y coordinates. Itīs counted in pixel.
  • width: How many pixel will be displayed in the X row (width).
  • height: How many pixel will be displayed in the Y column (height).


PHP Code:

function onCreated() {
  
showimg(index"ImageNameHere"XY);
  
changeimgcolors(indexredgreenbluealpha);
  
changeimgpart(indexstartXstartYwidthheight);
  
changeimgvis(indexalpha);
  
changeimgzoom(indexsize);


  • X: Where the image will be shown at the X row. Itīs counted in pixel.
  • Y: Where the image will be shown at the Y column. Itīs counted in pixel.
  • index: Thatīs the imageīs ID. Having 2 exact IDīs in one script will change that image. If the index is smaller 200, it will be shown to everyone. above 200 will just show it clientside.
  • red: The red part of the image. Goes up to 1 (=100%).
  • green: The green part of the image. Goes up to 1 (=100%).
  • blue: The blue part of the image. Goes up to 1 (=100%).
  • alpha: The alpha part of the image. Goes up to 1 (=100%).
  • size: How big / small the image will be zoomed.


Here are again the commands again for GS1 (offline editor). Explanation is the same.
PHP Code:

if (created) {
  
setimg ImageNameHere;


PHP Code:

if (created) {
  
setimgpart ImageNameHerestartXstartYwidthheight;


PHP Code:

if (created) {
  
showimg indexImageNameHereXY;
  
changeimgcolors indexredgreenbluealpha;
  
changeimgpart indexstartXstartYwidthheight;
  
changeimgvis indexalpha;
  
changeimgzoom indexsize;



comet graal 10-27-2011 07:42 PM

Yeah, so the point of callimuc's statement is that I was right, he just explained it like a pro.

Emera 10-27-2011 08:19 PM

Quote:

Posted by Askew One (Post 24859)
Hi,

I have started making levels but it is on the classic tileset :\ So does anyone know how to change the tileset to era?

If you are using the GraalEditor, then you have to use a script to change the tiles, play the level in the editor with the script in, and also, the tileset must be 8bit, or it won't show up. I used to use Gonstruct, which can be found here

If you choose the GraalEditor though, which is far more popular, then place this in a level NPC, and play the level. It's scripted in GS1, since the default GraalEditor supports only GS1, and not GS2 despite efforts to get that changed.
PHP Code:

addtiledef era_tileset-summer-offline.png,NULL,1



All times are GMT. The time now is 08:14 PM.

Powered by vBulletin/Copyright ©2000 - 2026, vBulletin Solutions Inc.