Hi,
I am creating some columns of empty slots this way:
Code:
var slotsPosition[27] = -1700,0,100,
-1275,0,100,
-850,0,100,
-425,0,100,
0,0,100,
425,0,100,
850,0,100,
1275,0,100,
1700,0,100;
var slotsHandle[10];
var slotsIndex = 0;
var slotsCount = 0;
entity* tempSlots;
define _slotID, skill99;
var numberSlots = 9;
//@
function create_slots()
{
while(slotsIndex < 27)
{
slotsCount += 1;
temp.x = slotsPosition[slotsIndex];
temp.y = slotsPosition[slotsIndex + 1];
temp.z = slotsPosition[slotsIndex + 2];
if(slotsIndex < 27)
{
tempSlots = ent_create ("kugel.mdl",temp,null);
}
tempSlots._slotID = slotsCount;
slotsHandle[slotsCount] = handle(tempSlots);
slotsIndex += 3;
}
}
As you can see in the image below the slots can be fullfilled with an object each one:
But i want to limit the x coordinates of the fullfilled slots and they must move always at same distance from each other.
Imagine the movement of the foosball / table soccer rods with the players in it to understand what i am looking for.
I tried many possible solutions but some of them need too much calculations and i know there is a simpler approach, but i didnt found it yet.. O_o
So, i hope someone could point me in the right direction.
Thanks in advance.
Cheers