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 Vertig0

Hi!

i have an entitiy whit the "_wmscalable" property and i wish to know if is possible put graphics to it.

Here is my code:

ig.module(
  'game.entities.magnetismo' 
)
.requires(
  'impact.entity' 
)
.defines(function(){
  EntityMagnetismo = ig.Entity.extend({
        _wmDrawBox:   true,
		_wmBoxColor:  'rgba(255, 0, 0, 0.5)',
		_wmScalable:  true,
		side:         '',
		gravityFactor: 0,
		polarity:     'neutral',
		potency:      500,
		type: 	      ig.Entity.TYPE.B,
		checkAgainst: ig.Entity.TYPE.A,
		check: function(other){

                ...

In a "normal" entity with the animsheet and "addanim" i can add the graphics, but this dont work in this one.

Thanks in advance!

1 decade ago by Arantor

It's purely for the editor (hence the wm prefix)

http://impactjs.com/documentation/class-reference/entity#wmscalable mentions it more. It's basically for making entities in the editor that aren't for graphics but for triggering gameplay events, like the entities used in Biolab Disaster to trigger things happening when the player gets to them.

1 decade ago by dominic

To scale graphics, see this article.
Page 1 of 1
« first « previous next › last »