Assault Andy Administrator
I make other people create vaporware
Registered 29/07/2002
Points 5686
22nd December, 2003 at 03:19:54 -
Is there a condition that will select an object with a certain alterable value? Like this:
Select all active1's that have an alterable value of 5 >>> Destroy
Because I need this for a traffic engine I am making. The real problem I have is that I want to match together objects with the same alt b's but there will not always be the sam amount of both the objects. And you can't just have the code:
active1.alt b = active2.alt b >> active1.x\y = active2.x\y
Because then MMF doesn't know which active 1 and 2's to pick to check if their alterable values are = to another. I did try this aswell:
pick active1 at random, pick active2 at random
active1.alt b = active2.alt b >> active1.x\y = active2.x\y
but that's really awful because you have to be lucky for MMF to pick a active1 and and active 2 with the same alt vals, unless you only had one of each but that's not the case.
Any ideas or other traffic engines would be great.
The second question about matching objects can be managed by spreading value B.
Do something like:
Number of object 1 < Number of object 2:
create object 1 at -32,-32
Number of object 1 > Number of object 2
+ Pick one of object 1:
Destroy object 1
Always:
Spread 0 in value B of object 1
Spread 0 in value B of object 2
Always:
Start loop #0 for (Number of object 1) loops
Loop trigger #0
+ Value B of object 1 = Loop step of loop #0
+ Value B of object 2 = Value B of object 1:
Set position of object 1 to 0,0 from object 2
The fast loop goes through each pair individually and assigns the position. Oh and make sure you put the events in that exact order too.
n/a
Assault Andy Administrator
I make other people create vaporware
Registered 29/07/2002
Points 5686
22nd December, 2003 at 05:47:15 -
That's not what I was looking for, but I modified this part:
Loop trigger #0
+ Value B of object 1 = Loop step of loop #0
+ Value B of object 2 = Value B of object 1:
Set position of object 1 to 0,0 from object 2