Sushin I was told by people on the forums that we could not deactivate objects that are at a certain distance.I have never seen any tutorials of Deactivating objects out of veiw for construct 2,I have seen the trigger once function before but i never used it,I would love to know how to deactivate objects at a certain distance,But at the same time have them reload when you are close again and still be in the same place.
Sorry about that i do see the event you said to use but will this work with arrays?
Or will this be better to use if im placing tiles manually?
I am just trying to figure out the ins and outs
I'd have to see what you were doing, but for example:
I'm making a game with platformer AI that has line of sight and all that. I think what I would do (actually what I would do is just create the enemies when the player reaches a certain point) is put all the AI behaviors into a group, and put that group under an event such as "if distance(player.x, player.y, enemy.x, enemy.y) < 600" (the entire width of the screen)
and that way, the events would only be active if the player is 600 pixels or closer. You might have to pick and choose which events you can have this happen for though, depending on how your code works, but I think it would help save memory depending on how many objects you have and how much code each of them is using.
The alternative would be to delete and create static interactive objects when the player is close to a point, and restore values based on global variables if necessary. Seems complicated but if you don't have any other options you might want to experiment.