toggle

  1. William Garrison

    GMS 2 if Toggle

    Why doesn't this work? var toggle = false; if keyboard_check_pressed(ord("1")) && (!toggle) { image_index = 1; toggle = true; } if keyboard_check_pressed(ord("1")) && (toggle) { image_index = 0; toggle =...
  2. J

    Legacy GM Fullscreen toggle isnt persistent

    I made an object which contains a step event with the following code: if(keyboard_check_pressed(ord("F"))) { if window_get_fullscreen() { window_set_fullscreen(false); } else { window_set_fullscreen(true); } } Its supposed to toggle fullscreen...
  3. jf_knight

    Toggle through a selected set of rooms

    I would like to be able to toggle through a selected number of rooms. I want to do this using my Xbox controller's shoulder buttons L and R. The code provided allows me to do this although it continues going into other rooms. how can I edit this so that there may be a threshold and toggle...
  4. D

    Legacy GM [SOLVED] Toggling shadow through instances

    Shame that my first thread has to be about a problem I have, but grim is the life of a horrible, terrible game-maker such as myself. The story: Anyway~ I've been trying to create a dynamic shadow engine. Certain objects would run a create event that creates an instance of a shadow object of the...
  5. Ayziak

    GMS 2 {SOLVED} Issues with scripts...

    So I've been working on some misc useful scripts to share here, yet this one isn't working, and it's driving me crazy. What am I doing wrong here? /// @description Ayziak's Two Value Variable Toggle /// @param variable Which variable /// @param val1 value 1 /// @param val2 value 2 variable =...
  6. Shadowblitz16

    one line toggle with function help?

    can someone help me understand why this is not working image_frame = rround(2 - image_frame, 0, 2); // description rround // param var // param min // param max var _var = argument[0] + 1; var _min = argument[1]; var _max = argument[2]; return round((_var - _min) / (_max-_min)) * (_max -...
  7. C

    [SOLVED] Switch to toggle other object

    Hi there fellow coders, I am totally new to GameMaker but not to programming in general, so please point me to a ressource of knowledge, if my question turns out to be pointless :p I am trying to accomplish the following: a) define a toggle object (here called obj_dice) b) define a background...
  8. ZeDuval

    Asset - Extension Flags *UPDATE*

    UPDATE: v2.0.2; New: Last version included as a rollback-possibility Clearer seperation between global and local Flags Reduced amount of macros to use Added possibility to access local Flags of one object from another Added shortcut-functions that are very useful if Flag system is intensively...
Top