Firstly I would put the lines that call the threads _below_ level waittill spawn. Only things that need precaching should be above prespawn.
Secondly, your movement thread.
Code: Select all
brushloop2:
$brush2 time 4
$brush2 movenorth 200
move
wait 3
$brush2 time 4
$brush2 movesouth 200
move
wait 3
$brush2 time 4
$brush2 movesouth 200
move
wait 3
$brush2 time 4
$brush2 movenorth 200
move
wait 3
goto brushloop2
end Code: Select all
brushloop2:
//only need to specify an objects speed once if not changing it
$brush2 time 4
while (1)
{
$brush2 movenorth 200
$brush2 waitmove //wait till move is done
wait 3
$brush2 movesouth 200
$brush4 waitmove
wait 3
$brush2 movesouth 200
$brush2 waitmove
wait 3
$brush2 movenorth 200
$brush2 waitmove
wait 3
}
end I understand in your case the objects are moving in opposit directions but if you wanted more than one object moving the same way you could do it this way.
$brush thread movebrush
$brush2 thread movebrush
Code: Select all
movebrush:
//only need to specify an objects speed once if not changing it
self time 4
while (self)
{
self movenorth 200
self waitmove //wait till move is done
wait 3
self movesouth 200
self waitmove
wait 3
self movesouth 200
self waitmove
wait 3
self movenorth 200
self waitmove
wait 3
}
end 


