Custom Event Editor w/ Scripting

Okay, so I am using Phaser w/ Tiled and absolutely love it.

I was thinking of something that I saw on the Godot engine. I know Tiled isn’t a game engine, but honestly, I use it like one!

For example, my suggestion is something like this:

See the middle left, a custom event box where we can add our own scripting code for each object. For example, in my game when a player clicks on their stash it opens up their inventory. I could then put my code in there and have it export as a separate javascript file along with the json format (or whatever language / format the person uses). – Obviously this suggestion doesn’t have to happen like that, but I hope you get my concept! :smile:

Edit: This would speed up the workflow so freaking fast, my head would spin. :smiley: Could make my maps so much more interactive, so quick!

1 Like

I think you should be the one managing external script files like that, but what Tiled could support is to give types to the custom properties, and support a “file” type. Then, you link the object to the file using a custom property, and Tiled can provide a quick way for you to open that file in the Explorer or in your favorite text editor.

That would provide most of the convenience you’re after, right?

Yeah, I guess that would probably work the best. I was just using the Godot engine earlier this month and saw how easy you can script stuff and use their language within the editor. Although, Tiled is totally different and not really a game engine, but that’s where my idea originated from. I’m actually using the objects thing right now and then just setting it a property of ‘Stash’, and then inside Phaser I link that to the open stash function (or whatever). I guess that way is sufficient. In development, I just sometimes like to hang out in a different program than notepad++ all day :sunglasses: – and Tiled is so fun.

That’s nice to hear! I’ll definitely work to make sure you can spend even more time in Tiled in the future, but if something needs coding I think it’s better to rely on people’s own editor and just provide a quick way to open it.

On the other hand, adding support for multi-line property values is something that would make sense to add as well.

1 Like