malware-dev/MDK-SE

[Feature Request, example] linking custom xml block to class for the block event handling

pwaksman973 opened this issue · 1 comments

If you have time, could you add one example of how can we add a class event handler for a custom block?

Lets say you go, copy a game xml block definition like timer block for instance. You change the subtype for your unique subtype, and now you want to change the control panel and its property and handle the tick event.

I'm having trouble figuring out how to do this, if I try to implement the IMyTerminalBlock, it would require some how a instance of a block already, but trying to use the MyFunctionalBlock, MyCubeBlock or any other, just gives the error about a prohibited class.

An example for how to join custom block xml with its script and pack it as a single mod

MDK and this wiki pertains to ingame scripting not modding. I am not a modder - at least, I am not a block modder.. Go to Keen's discord, #modding-programming. You should find the help you need there.