Well, it matches the source except for whitespace, or do you mean even the code doesn't match somehow?
Oh no, don't get me wrong.
I wanted to say that the source code view doesn't reflect the blocks code in a way that one can see what he has done in the block mode. Look, there's an "when created"-event, but in the source, it's the init() function. If I add an event "scene.onCollision", for example, I can't find any reference in the source.
Here's an example:Two events:
- "when created", I renamed it to "cursor.Init"
- "always", I renamed it to "cursor.Update"
The blocks look like this: (btw. why aren't they are in the same order exported then they appear in the event list?)

... and the source code is this:
(import statements snipped)
class Design_136_136_CursorController extends ActorScript
{
public function new(dummy:Int, actor:Actor, engine:Engine)
{
super(actor, engine);
nameMap.set("Actor", "actor");
}
override public function init()
{
actor.makeAlwaysSimulate();
addWhenUpdatedListener(null, function(elapsedTime:Float, list:Array<Dynamic>):Void
{
if (wrapper.enabled)
{
if ((actor.getX() < 48))
{
actor.setX(48);
actor.setXVelocity(0);
}
if ((actor.getY() < 48))
{
actor.setY(48);
actor.setYVelocity(0);
}
if (((actor.getX() + (actor.getWidth())) > 672))
{
actor.setX((672 - (actor.getWidth())));
actor.setXVelocity(0);
}
if (((actor.getY() + (actor.getHeight())) > 432))
{
actor.setY((432 - (actor.getHeight())));
actor.setYVelocity(0);
}
}
});
}
override public function forwardMessage(msg:String)
{}}
If you have more complex behaviors, the order of the generated code is also different then the order of the events in event pane, which makes searching for your code more complicated
It takes a lot of time and understanding to find your own code here, as none of my identifiers (cursor.Init() or the systems identifier (always, when created) do appear.
I suggest at least:
- implement comments to reflect the events (insert event name and type)
- if possible, keep the order of the events code the same then in the event pane