Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by quidmonkey

One of the best parts of ImpactJS is Weltmeister. Like many of you, if you use Weltmeister for any length of time, you'll run into some shortcomings. I created this thread to keep track of all the awesome Weltmeister tweaks people have done.

1) How to Select Overlapping Entities.

2) Adding Level Properties - Comes with a very nice UI panel!

3) One of the most annoying parts of Weltmeister is that is resets the screen position and zoom every time you reload a level. Here's my workaround:

On line 338:
$('#layers').sortable('refresh');

// screen pos plugin
if (data.screen) {
	this.screen.x = data.screen.x;
	this.screen.y = data.screen.y;
	this.mouseLast = {x: ig.input.mouse.x, y: ig.input.mouse.y};
	thais.drag();
	wm.config.view.zoom = data.screen.zoom || 1;
	this.zoom();
}

this.resetModified();

On line 365:
this.fileName = path.replace(/^.*\//,'');
// screen pos plugin
var data = {
	'screen': { x: this.screen.x, y: this.screen.y, zoom: wm.config.view.zoom },
	'entities': this.entities.getSaveData(),
	'layer': []
};

var resources = [];

Finally, on line 232:
// screen pos plugin
if( delta != null ) {
	if( z <= 1 ) {
		if( delta < 0 ) {
			z /= 2;
		}
		else {
			z *= 2;
		}
	}
	else {
		z += delta;
	}
}

That'll save your screen pos and zoom on each level, so that when you load it, you can start editing right where you left off.

Feel free to let me know of any other good Weltmeister mods, and I'll add them to this thread!

1 decade ago by FelipeBudinich

Thanks very much!

The level properties plugin is exactly what I needed 9 months ago hehe!!

I had been doing it by hand, because it does feel "natural" to add level properties to the file that contains the level (which bkg music file should I play, etc).

So, I'm gonna implement that for my next project ;-)
Page 1 of 1
« first « previous next › last »