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

1 decade ago by rampy

So thanks to some kind forum members, I've got a simple power meter for my golf game working.

What I want to do is upon ig.input.released send some parameters to my golfball entity to move it :)

can i do something like ig.entity.golfball(vel.x, vel.y);

or update it directly with ig.entity.golfball.vel.x = newvalue;

or should i call the golfball object from within powerbar and ????

know what i mean?

Sorry if this is a noob question ....


1 decade ago by stahlmanDesign

try something like :
for (var i=0;i<;i++){
 if ([i] instanceof EntityGolfball){[i].vel.x = newX;[i].vel.y = newY;

1 decade ago by rampy

Thanks, I'll give it a shot... is there no way to call it by name/reference instead of index # e.g.['Golfball'].vel.x= newX;

Just curious.

1 decade ago by RomainT

If your entity has a name attributes you can use :)
Page 1 of 1
« first « previous next › last »