How to increase the Multiball.grid in code

Discuss Lemur and share techniques.
Post Reply
MrOT
Newbie
Posts: 5
Joined: 05 Feb 2012 17:25

How to increase the Multiball.grid in code

Post 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?
axel_liine
Liine Staff
Posts: 126
Joined: 14 Dec 2011 12:12

Re: How to increase the Multiball.grid in code

Post 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);
MrOT
Newbie
Posts: 5
Joined: 05 Feb 2012 17:25

Re: How to increase the Multiball.grid in code

Post by MrOT »

WORKS!

You are the greatest! Thanks very much!
Post Reply