deactivate

  1. H

    Windows How do I deactivate all instances except for 2?

    Hey I am making a game with a pause system that makes it so that it deactivates everything using "Instance_deactivate_all()". I was wondering if there is a way to deactivate everything except for 2 objects because whenever you pause the game I want there to be an option to go to the main menu...
  2. flyinian

    SOLVED Pause all but one room?

    I am trying to implement a pause system into my game. The only time I want the game to pause is when the player is on the main menu room. I have numerous persistent objects that are initialized on game start. Could I use instance_deactivate_all(true) and pick and choose which instances don't...
  3. Nathan

    Mac OSX Solved

    https://docs2.yoyogames.com/source/_build/3_scripting/4_gml_reference/instances/deactivating_instances/instance_deactivate_layer.html Per the manual it says" You need to supply the layer ID, which can either be the name of the layer as written in the code editor (as a string) or the actual...
  4. C

    GML [SOLVED] Deactivate tiles not in camera view.

    Good evening guys and girls, Im having some issues trying to figure out how to Deactivate tiles outside of the camera View, I basically have a tiling object that draws in random tiles to the whole room (which is 20000x20000) this is basically killing the memory usage of the game So I was...
  5. Hudsonius

    Help deactivating objects not in the view? [SOLVED]

    I'm using a very large room with hundreds of objects in it, and I needed to deactivate objects not in the view, so I used: instance_activate_region(vx,vy,vw,vh, true) instance_deactivate_region(vx,vy,vw,vh,false,true) In the controller object. (I set vx, vy, vw, and vh to be view x, view y...
  6. G

    [SOLVED] Optimizing Room with Thousands of Objects

    I've got a room with about 3000 objects that are marked as optimizable (par_optimize). So I've divided my room into chunks by creating a "chunk" object for each chunk (obj_optimize_chunk). Each chunk size is the same size as a view. Each chunk object populates its lists of data for optimizable...
  7. L

    GMS 2 Respawning enemies and traps (outside of view_camera)

    What would be the best way to make objects (like enemies and traps) to respawn at their original position if destroyed/left behind AND left outside the view_camera? (like old school NES games). My current code works like it deactivates everything and activates everything within my view_camera...
  8. Turbulence421

    GMS 2 Is deactivating worth it?

    Hello, I'm have a platformer game in GMS2 that currently deactivates instances outside the view every couple steps in order to help with processing power. However, I have heard that deactivating instances doesn't always help and it might wind up slowing the game even more if you have a lot of...
  9. Anixias

    GMS 2 [SOLVED] Really Weird instance_deactivate Glitch

    Hello there. I'm currently focusing on optimizing my game as much as possible before I begin adding multiplayer and other new content. In my terrain object, I am deactivating all par_doodad objects and reactivating a region around the view. Here is the hierarchy of obj_tree (like, all of it's...
  10. T

    Game pause with sliders

    Hello everyone! I made pause system, everything works well. I have sliders (for game options) as individual objects and when I create them with instance_create I don't see any sliders. Without pause sliders created well. Is there way to create active object when game is paused (I use...
  11. alexhinton

    GMS 2 Order of Instance Deactivation / Reactivation?

    Just as the title says...Is there an order to what instances are deactivated first when using a code like instance_deactivate_region() ? If I had to guess I would think it went by a room's Instance Creation Order? Just curious. Thanks in adavance!
  12. Le Slo

    Deactivating a region

    Hello! I'm trying to make a specific deactivating system because of some objects I have in my game should behave differently to this matter. I started trying to replicate the instance deactivate region function. So my code looks like this: var value=1; var NCX=obj_camera.camX; var...
  13. 2

    Overhead of Objects with Many Variables

    How much is the difference in overhead of an object with 50-75 variables versus an object with no variables other than the built in ones? Will 300 activated objects with these variables make a large difference in overhead if they aren't currently changing values, just initialized? What about...
  14. M

    How to deactivate anything outside of two views?

    There's two players in my game, but the main room is big and with many instances, thus it lags quite a bit at the moment. If i try deactivating (instance_deactivate_region) everything outside of the two players' views (putting the code in the Step events of the player objects), it ends up...
  15. Y

    Legacy GM objects not deactivated

    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: else if(view_xview[0] - lastxview > difference...
  16. A

    Pause Between Teleports, Should Player Destroy/Respawn?

    I have everything working for a pretty dramatic type of bells and whistles n fireworks teleportation feature going on ..if i do say so myself... so it's not (game-time) instantaneous.. .like you don't touch one pad and appear on the next instantly.. there's time and animation involved, not to...
  17. S

    Instance Deactivation and Views

    Hello everyone. I'm having problems in regards of instance activation/deactivation. Back in GM8, I've always done this. I have an instance called "camera" which, in the step event, controls the enemy activation/deactivation. obj_deactivateme is the parent of object for all enemies (it's...
  18. zendraw

    Legacy GM Q:Tiles

    Is there a chanse yoyo will make a deactivating function for tiles? currently im tryin to tile up an overworld but i end up with 50k+ tiles that i have no controll over. now if it were instances, i culd just deactivate the lot of them and things wuld be fine and dandy. how does one deal with...
  19. Shadowblitz16

    GMS 2 (Solved) activate and deactivate instance by id

    does anybody know how to deactivate and activate a instance by id? /// @description Insert description here // You can write your code in this editor event_inherited() var dx1 = screen_y; var dy1 = screen_x; var dx2 = screen_y+screen_height/16; var dy2 = screen_x+screen_width/16; for (var...
  20. Ziberteck

    HTML 5 Depth

    So I've been noticing that there is an issue with depth in game maker html5 edition what doesn't exist in the windows version. To reduce lag, as one should, i have a script that limits the objects that are active on the screen. // code ran through the step event of a persistent controller...
Top