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 blakmetall

entityball


------------------------------------------
entitySomeotherstuff

update: function(){
this.parent();
//get data from entity ball
}

----------------
basically thats my problem, sorry, but I really search a lot of time
inside impact, and google, but I cant find a solution.
also its kind of late, and im starting to fall sleep.

well thas all folks, i will apreaciate the help.

ty

1 decade ago by MartinGr

If you have given your balls name parameter a value you can simply access it with ig.game.getEntityByName() method.

var ball = ig.game.getEntityByName('ball');

If your ball does not have a name parameter, you can fetch all instances of ball entity with ig.game.getEntitiesByType() method.

var balls = ig.game.getEntitiesByType( EntityBall );

And if you have a single instance of ball you can directly access it with

var ball = ig.game.getEntitiesByType( EntityBall )[0];

1 decade ago by blakmetall

this is the solution I was looking for, thank you so much,
definitely will help me.
Page 1 of 1
« first « previous next › last »