General
How to increase the Multiball.grid in code
Started by MrOT on .
Sign in or create an account to join the conversation.
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:
Is there any possibility to change the grid rows and columns dynamically?
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:
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?
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.
decl agrid = getattribute(ContainerTopLeft.MultiballOne, 'grid_steps');
agrid[0]++;
setattribute(ContainerTopLeft.MultiballOne, 'grid_steps', agrid);WORKS!
You are the greatest! Thanks very much!
You are the greatest! Thanks very much!