Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Tile Editor Help (https://forums.graalonline.com/forums/showthread.php?t=134266106)

Emera 03-28-2012 12:34 AM

Tile Editor Help
 
2 Attachment(s)
I've set myself the task of scripting a tile editor. Firstly though, I thought I'd take a look at some other tile editors and base my first attempt on what I can gather from them. I took a look at oo_jazz_oo's editor and coded my own from what I saw in his.

Basically, the editor works when it comes to laying tiles and such. That part I found easy. I'm quite embarrassed to say that the part I'm finding the most difficult to perfect is drawing the selecting border correctly and setting the selected tiles by dragging and such. There's a lot of math going on, and that isn't my strong point.

Here's a list of current buys I currently have.
  • Selecting tiles from the tileset image isn't working 100& correctly. It sometimes flicks back and doesn't position itself correctly.
  • After selecting tiles, the selecting border doesn't always go away and doesn't select the tiles correctly. This usually happens when drawing sideways-right rectangles.
  • When scrolling to select tiles on the other side of the panel, the GUI control detects the onMouseDown event and begins to select tiles while I'm using the scroll bars.

And here's a list of what I still need to add.
  • Selecting tiles from the level. It's only currently possible to select tiles from the tile editor, which is quite annoying.
  • Showing the player's current selection while the mouse is outside the drawing panel control.
  • Flood filling.
I'd like to say thank you to Dusty for his ImageToTile() function, and also oo_jaz_oo for his editor, so I could study it.
If anybody is able to help me out fixing these bugs, I'd be grateful!

Level Editor Code

Angel_Light 03-28-2012 04:27 AM

probably could take a look at one I made awhile ago, it can fix all the issues you have stated.

http://forums.graalonline.com/forums...hp?t=134262983

Emera 03-28-2012 04:01 PM

Quote:

Originally Posted by Angel_Light (Post 1690206)
probably could take a look at one I made awhile ago, it can fix all the issues you have stated.

http://forums.graalonline.com/forums...hp?t=134262983

I'll check it out. Thanks.


All times are GMT +2. The time now is 10:16 AM.

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