Y
Yvalson
Guest
so objects outside of the view and it's padding get deactivated. this works if I do it every frame so I want to do it only when the walked a certain amount of pixels (256 in this case) but for some reason now everything keeps being activated. code:
Code:
else if(view_xview[0] - lastxview > difference || view_xview[0] - lastxview < -difference || view_yview[0] - lastyview > difference || view_yview[0] - lastyview < -difference){
if(!Obj_Mognorian_Spawner_Forest_1.Arena_Created){
lastxview = view_xview[0]
lastyview = view_yview[0]
instance_deactivate_region(view_xview[0] - 256, view_yview[0] - 256, 1538, 976, false, true)
instance_activate_object(Obj_Mognorian_Spawner_Forest_1)
instance_activate_object(Obj_Ekirth1)
instance_activate_object(Obj_Samonith1)
instance_activate_object(Obj_ForestBlockade)
instance_activate_object(Obj_DayNight)
instance_activate_object(Obj_Rain_Cont)
instance_activate_object(Obj_Sandstorm_Cont)
}
}
//difference = 256