Page 1 of 1

How to increase the Multiball.grid in code

Posted: 06 Feb 2012 16:30
by MrOT
Hi again.
I want to increase the X Axis or the Y Axis of a Mutliballgrid by scripting.
Did not find out how to do this.

Tried it like this:

Code: Select all

decl agrid,x,y;
agrid = getattribute(ContainerTopLeft.MultiballOne, 'grid'); 
x = agrid.x[0];
y = agrid.x[1];
x++;
setexpression(ContainerTopLeft.MultiballOne, 'grid.x[0]', x);
setexpression(ContainerTopLeft.MultiballOne, 'grid.x[1]', y);
of course it is not working, because he getting the 'on/off'' attribute at first getattribute.

Is there any possibility to change the grid rows and columns dynamically?

Re: How to increase the Multiball.grid in code

Posted: 07 Feb 2012 10:54
by axel_liine
The attributes for Multiball are 'grid' (1 if enabled, 0 otherwise), and 'grid_steps', which is an array containing the number of steps horizontally and vertically.

Code: Select all

decl agrid = getattribute(ContainerTopLeft.MultiballOne, 'grid_steps'); 
agrid[0]++;
setattribute(ContainerTopLeft.MultiballOne, 'grid_steps', agrid);

Re: How to increase the Multiball.grid in code

Posted: 07 Feb 2012 11:38
by MrOT
WORKS!

You are the greatest! Thanks very much!