Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Level Design (https://forums.graalonline.com/forums/forumdisplay.php?f=6)
-   -   Glitched Graal Editor.. (https://forums.graalonline.com/forums/showthread.php?t=134261548)

WaDaFack 01-04-2011 11:22 PM

Glitched Graal Editor..
 
I took pics1.png and edited 1 tile on it, and ever since I tried loading it, my entier Graal Editor is all bugged. Even re-installing it won't work. I can't even use pics1.png anymore x.x anyone know what the problem is?
The code I'm using..
NPC Code:
// NPC made by WaDaFack
if (created) {
}
addtiledef pics1.png,new2.nw,0;



This is what I see..
http://img5.imageshack.us/img5/1585/glitchedlevel.png

Soala 01-04-2011 11:23 PM

addtiledef is not even inside the if (created) lol

GS1:
PHP Code:

// NPC made by WaDaFack
//#CLIENTSIDE
if (created) {
addtiledef pics1.png,new2.nw,0;



GS2:
PHP Code:

// NPC made by WaDaFack
//#CLIENTSIDE
function onCreated() {
addtiledef("pics1.png",new2.nw,0);



cbk1994 01-04-2011 11:24 PM

pics1.png has to be in the main Graal directory. I'm not sure if you can modify it, but try renaming it to pics1_edit.png and adding the original back and seeing if that fixes your problems.

Quote:

Originally Posted by Soala (Post 1620380)
addtiledef is not even inside the onCreated function lol

It wouldn't work if it was.

edit since you edited yours: that's still not the problem

edit again since you edited yours again:

PHP Code:

// NPC made by WaDaFack 
//#CLIENTSIDE 
function onCreated() { 
addtiledef("pics1.png",new2.nw,0); 


needs quotes around new2.nw

Soala 01-04-2011 11:26 PM

I just realized it was pics1... isn't it supposed to load by default?
I usualy get black tiles over the screen when something's wrong, not a huge load of ****ed up imgs. Weird.

fowlplay4 01-04-2011 11:36 PM

If you used Paint it up-converted it to 24-bit colors, you'll need to lower the colors to 8-bit/256 Colors using IrfanView or other image editing packages.

WaDaFack 01-04-2011 11:47 PM

I put that, and it still doesn't work.. everything is black and white now.
NPC Code:
// NPC made by WaDaFack
//#CLIENTSIDE
if (created) {
addtiledef pics1.png,new2.nw,0;
}



Oh, and for my tileset, I'm not really concentrating on that atm. Just trying to get pics1.png to work first.. x.x

xXziroXx 01-04-2011 11:49 PM

Quote:

Originally Posted by WaDaFack (Post 1620402)
Oh, and for my tileset, I'm not really concentrating on that atm. Just trying to get pics1.png to work first.. x.x

PHP Code:

if (created) {
  
removetiledefs;


Done.

Fulg0reSama 01-04-2011 11:53 PM

Quote:

Originally Posted by xXziroXx (Post 1620403)
PHP Code:

function onCreated() {
  
removetiledefs();


Done.

fixed

WaDaFack 01-04-2011 11:55 PM

Quote:

Originally Posted by xXziroXx (Post 1620403)
PHP Code:

if (created) {
  
removetiledefs;


Done.

Thanks! :) This worked, thanks to everyone tried to help too!

xXziroXx 01-05-2011 12:07 AM

Quote:

Originally Posted by Fulg0reSama (Post 1620404)
fixed

Don't be a smart ass, he wants it for the editor.

StormYs 01-05-2011 12:51 AM

ooo a scripting battle

nullify 01-05-2011 12:54 AM

Ziro was the victor.

xXziroXx 01-05-2011 01:31 AM

Quote:

Originally Posted by nullify (Post 1620419)
Ziro was the victor.

Didn't even break a sweat. :cool:

nullify 01-05-2011 01:34 AM

Unfortunately you beat me to it. :(

cbk1994 01-05-2011 01:34 AM

Quote:

Originally Posted by nullify (Post 1620419)
Ziro was the victor.

Especially since there was an error in Fulg0re's script.

Soala 01-05-2011 02:05 AM

Quote:

Originally Posted by xXziroXx (Post 1620422)
Didn't even break a sweat. :cool:

Ever watched "Metal Gear Awesome"?

Tigairius 01-05-2011 05:12 AM

Quote:

Originally Posted by Fulg0reSama (Post 1620404)
Quote:

Originally Posted by xXziroXx (Post 1620403)
PHP Code:

function onCreated() {
  
removetiledefs();


Done.

fixed

Technically, that is wrong - removetiledefs() expects a parameter and will return an error if nothing is passed.

Syntactical correctness in GScript2 would yield:
PHP Code:

//#CLIENTSIDE
function onCreated() {
  
removetiledefs("");


However, Ziro's is syntactically correct for GScript1.


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

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