> for each (Ships)
Ships('status') = "Idle"
Tell ships to move to random position
Set Ships('status') = "Roaming"
My object count went up to close to 1.600 before my FPS dropped below 60.
However, when I tried this:
Pick (Ships) by value 'Status' = "Idle"
My object count went up to close to 16.000 before my FPS dropped below 60.
So this is clearly faster.
in addition to the fact that you need a trigger it will add all Idle objects to the SOL JanMan needs to loop though each instance of the family so that it will only pick one at a time.
Also Jan man why do you constantly need to be writing to the .ini file? if the player leaves the layout just write the values then constantly writing to the disk is slow.
we also talked about this on the chat yesterday. If you have each object in the family with a private variable name your writing function would look like this.
->on function Save Positions
->for each [familyname]
-->ini.writevalue(npc('name'),"x") value: [family name].x //the group is the NAME private
variable of your NPC family Item = x
-->ini.writevalue(npc('name'),"y") value: [family name].y