GM:S 1.4 Is it ok or a bug?

Discussion in 'Legacy GameMaker Community Tech Support' started by NeonBits, Oct 7, 2017.

  1. NeonBits

    NeonBits Member

    Joined:
    Sep 22, 2017
    Posts:
    280
    I make a sprite and save. If I reopen and edit it, then chose to resize the canva, I get a message saying that this will affect the current sprite. If I click ok, the canva does change, but what I have edited returns to the original sprite. Is this a bug or the noob must learn to save what was edited before changing the size of its canva?
     
  2. klys

    klys Member

    Joined:
    Jun 21, 2016
    Posts:
    108
    There is not any problem with eh image editor of game maker studio. as you say you are probably not using it correctly.
     
  3. NeonBits

    NeonBits Member

    Joined:
    Sep 22, 2017
    Posts:
    280
    Good, thank you. But I hope the forum will check its alert system, I haven't received any for your reply and had to remember this post.
     
  4. IndianaBones

    IndianaBones Member

    Joined:
    Jul 5, 2016
    Posts:
    1,843
    Double-check your Alert Preferences in your profile settings. Make sure they are all ticked how you want them, or you may not receive some alerts.

    upload_2017-10-8_13-50-45.png
     
  5. NeonBits

    NeonBits Member

    Joined:
    Sep 22, 2017
    Posts:
    280
    Everything is check, I took a look before and everything is selected. But in section "Preferences" -Automatically watch threads that you create or when you reply" wasn't selected. Perhaps it was that? I thought it wasn't related to alerts since it's not in the same section.
     
  6. NeonBits

    NeonBits Member

    Joined:
    Sep 22, 2017
    Posts:
    280
    If I create a custom variable (ex: var house) and mispell it in a script, is it a bug if GM doesn't return an error? Got that earlier.
     
  7. GMWolf

    GMWolf aka fel666

    Joined:
    Jun 21, 2016
    Posts:
    3,164
    Are you sure the sprite is the same size? It may apear the same size in the editor, but at a lower/higher resolution.

    That is normal. The misspelt variable name will declare a new variable. This can create annoying bugs but they are not too difficult to find, especially with the debugger.
    (questionable GML design IYAM, but its what we have).
     
  8. NeonBits

    NeonBits Member

    Joined:
    Sep 22, 2017
    Posts:
    280
    Yes it is the same; you make one sprite, save, reopen, add a few pixels, click resize canva, and what you have edited returns to its original state. So I guess I should save before resizing.
     
  9. NeonBits

    NeonBits Member

    Joined:
    Sep 22, 2017
    Posts:
    280
    Is it ok or a bug?

    Objplayer step : script_execute(state)
    Objplayer create: state = scr_intro.
    Obj player doesnt exist.

    Obj_data step: if !(instance_exists(Objplayer)) {a = instance_create(Objplayer); a.x = 123; a.y = 123;}

    in scr_intro: path_start(path10, 3, path_endaction, 0);

    Objplayer just go straight line instead of following what it should. But if I write

    if (keyboard_check(vk_alt)) {path_start(path10, 3, path_endaction, 0);}

    Objplayer goes alright when pressing Alt.
    I've tried in scr_intro: with (Objplayer) { path_start etc;} same straight line.

    What am I missing? Is it ok or a bug?
    Edit: oops, I've wrote endaction but the original code is path_endaction
    Edit: I've tried path_start(path10, 3, path_action_stop, 0) but straight line.
    If it's true, the object doesn't move, if it's false, the object goes straight line only.
     
    Last edited: Oct 22, 2017
  10. NeonBits

    NeonBits Member

    Joined:
    Sep 22, 2017
    Posts:
    280
    I've found that "script_execute" could be the problem? If I write instead in obj_data step event:

    if !(instance_exists(objplayer))
    {a = instance_create(objplayer);
    a.x = 123;
    a.y = 123;
    with (a)
    {path_start(path9, 3, path_action_stop, false;}
    a.sprite_index = etc;
    a.image_speed = etc;}

    and if I remove "script_execute" in objplayer step event, objplayer follows path9 correctly.
    ------------------------------------
    If I leave script_execute in objplayer and add only a comment in scr_intro, path9 is again not followed, even if I change obj_data.

    I don't realy understand the logic, why scr_intro's path command wasn't working. If I choose to work with the new lines in obj_data, I end with no script_execute, I'm not sure how to program GM to tell objplayer to use script_execute again.
     
    Last edited: Oct 23, 2017
  11. NeonBits

    NeonBits Member

    Joined:
    Sep 22, 2017
    Posts:
    280
    Ok I dont get it but I just tried again and this command line with script_execute worked...........
     
  12. NeonBits

    NeonBits Member

    Joined:
    Sep 22, 2017
    Posts:
    280
    I confirm, in an object step event, I don't know realy how I manage to reach that, I think it's after many "run, close, fix, run...", but sometimes GM doesn't see anymore when a variable is not correctly written. I've even copied pasted a block of code and GM didn't see that some specefic objects were missing. GM 1.4.1772
     
  13. NeonBits

    NeonBits Member

    Joined:
    Sep 22, 2017
    Posts:
    280
    Computer has more than one session. To use GM under user session, it requires the admin pass. When projects are saved, files goes to admin folder. As many, when a project progress, I make a copy and work from there. In the past, a weird effect happened once I created a copy through windows copy/paste; GM didn't wanted to open the project, saying it needs to be a GM file. Perhaps because I've renamed the project file name (not extension)? If I add something at the end of the folder name, it's ok. So my folder name is like "my project.gmx - copy.gmx - copy.gmx" and I don't remember adding a .gmx at the end each time.

    Today the manual finaly opened after I clicked x on "preparation for a first use" html box; GM was not responding. Windows offered the option to close and search for a solution. Nothing followed. Back in GM, I clicked the manual icon and it worked. Seeing the manual in admin, I went to user session and opened GM... its recent history changed; I could not find my most recent project. In GM, I browsed the projects from the different sessions: nothing. Only past versions. I used Windows search, nothing from november 25. In GM, I opened the project on top of recent history; it was the project in its early stage. I opened a backup, GM said "you are opening a project from a backup, where do you want to save it", I selected "C/user/session name/documents/GameMaker/Projects", GM opened the project but it had no items in it. GM saved a project folder but it's empty.

    I closed GM, holded power until computer rebooted. I went to user session, opened GM; its recent history had now only four projects when there was near ten; most were copies. I clicked the first on top and my project was back. I clicked "save" instantly, then switched to Windows; in project folder the file was there, november 25. Back to GM, I saved in multiple places, just in case. Everything seems fine, but that was scary. I feel as if I could have lost the project.
     
    Last edited: Nov 26, 2017
  14. chamaeleon

    chamaeleon Member

    Joined:
    Jun 21, 2016
    Posts:
    709
    If anything you do in Gamemaker is important to you, implement a backup solution. Now. Do not pass go, do not collect $200. Do not rely solely on what Gamemaker does. Find a backup program that works in the background without user intervention and back up any and all projects related files (and any other important files too of course), ideally that backs up to another disk, another computer or the cloud. Also, source control can save you from yourself if you mess up something and am unsure what you need to undo.
     
  15. NeonBits

    NeonBits Member

    Joined:
    Sep 22, 2017
    Posts:
    280
    Scary; sounds as if some users had bad events under GM. I had a few surprises already. Backups are always good; one in the background without user action, you have suggestions? What do you mean by "source control", I don't know what that is.
     
    Last edited: Nov 27, 2017
  16. NeonBits

    NeonBits Member

    Joined:
    Sep 22, 2017
    Posts:
    280
    GM 1.4.1772
    I wanted to close the object but GM said there was an error at line 400 something of its step event. I've reopened step event but there was no line 400 something, because I've deleted a block of code just before and there was only around 300 lines. I've closed step event and tried to close the object again and had the same error. In the end, I duplicated lines and was able to close the object. edit: the compiler crashed after launching next but things went ok after.
     
    Last edited: Dec 14, 2017
  17. NeonBits

    NeonBits Member

    Joined:
    Sep 22, 2017
    Posts:
    280
    Script seems to remain active even after entering a different one.
    I've used a few keyboard_key_press for movement, in one script, with keyboard_check(vk_control) to trigger keyboard_clear(vk_anykey) just before changing state. To make sure keyboard_clear deactivates the directions, I've also added keyboard_clear(vk_anykey) in the next script, and in an animation_end_event, which returns to a different state. Only one script had keyboard_key_press. Despite moving from one state to another and returning to an iddle state, the object continued to move as keyboard_key_press. So I removed keyboard_key_press.

    different subject:
    So far, I finished a level. Everything follows what it should, but when I decided to change, in its script, the x+=3 of one object for x+=6, which is not linked to anything else, different bugs followed: collision where it's not supposed, instance_destroy not activating when it did, action tilting; I don't know how to say it, I'm no programmer, but it feels as if GM concentrates on its temp more than the project itself, I mean it's strange that a simple number only, linked to keyboard_check, can create such sudden change, through a script, when the whole level was doing fine. I reloaded and tried again, and that's how I got different result. At first, it was collision, after that it was the object not destroying itself, after that it was one object not following its countdown. So, in the end, I kept x+=3, GM seems to want it. The level is back as it was.
     
  18. NeonBits

    NeonBits Member

    Joined:
    Sep 22, 2017
    Posts:
    280
    Everything was well. Then I decided to remove the objects that controlled the room + the player object, leaving items only. I made a new object, to create what was removed, and placed it in the room. When controls are back and given to the player, everything is well but one object item loses its collision point. I don't know if it's its origin or mask, but no reaction happens. I didn't wanted to modify the code. The solution was to change the position of the object in the room. Then I placed it back to where it was and it was fine again. Also, image_speed becomes different sometimes.
     
  19. NeonBits

    NeonBits Member

    Joined:
    Sep 22, 2017
    Posts:
    280
    v.1772 (I know it's far away; I don't know if this was fixed but I thought it was interesting to write about it since I haven't seen in "release note" anything about keyboard_check_press other than adding it to android etc.)

    -obj_player has a collision event; inside, "keyboard_check_pressed(vk_control)" sends to a script to change animation.

    -"Animation end" returns to the original animation and state.

    Now you have made a new script with different conditions for a different object; and you decide there to return the player to its original state. You have two options: you code each step of what should happen or you take a shortcut with "keyboard_key_press(vk_control)" to simulate "keyboard_check_pressed" to activate the "animation end event".

    I took the shortcut; the animation follows and then the player can be controlled again; the animation was stuck in a loop but the real bug was vkcontrol not answering anymore. I've restarted the level, same. But something interesting happened after closing the game: when clicking in GM to edit codes, the cursor appeared somewhere else than where it was clicked. For exemple: if you click between "ee" in "place_meeting(x, y, object)" the cursor would go here "*/*place_meeting(x, y, object)" or there "place_meeting*/*(x, y, object)" or at the end of "object"; you cannot select position.

    I've opened a txt file and pressed a letter; the codes I copied before was pasted. Another letter opened the save option. Somehow, "ctrl" stays active even after the game was closed. I've reopened the script, clicked inside, same effect. I've relaunched the game; which was ok until the keyboard_key_press returned. "Right ctrl" key didn't answered and the animation was stuck in a loop. After pressing "left ctrl" the animation returned to normal, the player could again interract with its environment, and the "locked ctrl" didn't happened after closing the game.

    edit (short version):
     
    Last edited: Sep 10, 2018
  20. NeonBits

    NeonBits Member

    Joined:
    Sep 22, 2017
    Posts:
    280
    Yes, I was told it was not recommended to use version 1.4.1772. But I was wondering.

    You have objectA that uses "script_execute(state)". At some point, its script uses instance_destroy().
    In return, fatal error: unable to find "132142 (which is objectA I suppose)" called from objectA step event script execute(state). I thought that once an instance is destroyed, the script is no more active? Is it a bug or I'm supposed to use "instance_exists" even for the only object running the script? Is it ok to write "if ((instance_exists(objectA)) && (objectA.xy == true))" or should I use if "instance_exists" and then "{if (objectA.xy){etc}}"

    Similar event. ObjectZ gets created. Its create event contains "variableY = inst_100ABCD.y;". Result is "Fatal Error, unable to find inst_100ABCD" but the instance is created with the room and ObjectZ comes later, after the room has started. Is it a bug or should I again use "instance_exists".

    I've been on this a while now. I had to re-code coordinates often until walls became "true walls" for the old levels. I played this hundred times, worked fine, and now that I finished my last level, and tested again, the object still manage to pass through walls in the first stages. And now I get the errors described above, when things were alright before.

    Funny thing is, if I play the levels individualy, directly from running a room, not from the game start menu, I don't get the bugs. Yesterday, it was the lights; I didn't know what to do, so I closed the comp; the next morning, I run the game from its menu, all fine, but after passing the level with the lights, what's above followed. My guess is that using old scripts and separating situations in it with "if (room == room1){}else if (room == room2){}etc" made GM uncertain even if I deleted its temporary files manualy. Still, seeing the bugs "moving somewhere else" and levels running ok again without changing a thing feels as if a snake is travelling.
     
  21. NeonBits

    NeonBits Member

    Joined:
    Sep 22, 2017
    Posts:
    280
    The problem was: two instances of one object had the same frame and weren't responding.

    I worked with two GM opened side by side, created a new room from scratch and added items, codes, one after the other, then made the room with the bug. Things were ok. It's when the second level was added that the bug returned in the buggy level; which was a duplicate of the second level.

    I've read on the forum that coding with "instance_id" wasn't good; if something changes, the id will change and it won't be recognized. I did verify and everything seemed ok in the room description. After weeks on this, I've renamed the instances id to make it easier to refer to them (inst_LL, inst_RR); GM was fine about it but no success.

    Today, at last, after all that full time searching, I've added in GUI:
    Code:
    if (instance_exists(obj))
    {draw_text(123, 456, "obj_index = " + string (obj.image_index));} 
    If one variable becomes "true", the "image_index" changes. The GUI displayed "draw_text" in the second level but, surprise, not in the last one despite the two instances are on screen. I thought, maybe it could be the instances id, but each instance id stayed the same in the duplicated room.

    When I clicked, in room editor, the option to change the instances names in the buggy level, GM now suddenly woke up "instances names must be unique" (I didn't add anything, just clicked the option). I changed the names (inst_LL, inst_RR for inst_LL2, inst_RR2), edited the codes; and now it's fine.

    I've opened an older version of the project, where I haven't modified the instances names (the id are the same in the duplicated room) and edited; GM didn't reacted; launched the game and it was good.

    I've played the whole project, all good. I do use "check resource names" and "check scripts"; I don't know if it verifies instance names but was always good. If this is a bug, I hope this can help for GM2.
     
    Last edited: Nov 25, 2018
  22. NeonBits

    NeonBits Member

    Joined:
    Sep 22, 2017
    Posts:
    280
    The game was ok. Then a few sounds were added. I deleted the last one; it was there already. Everything is already coded; I simply replaced one sound for another, here and there. I thought things were ok until I opened another script; there, GM wrote "error, variable expected"; I clicked "check all scripts" and, surprise, around five scripts had mistakes. After searching, I couldn't find something missing. Launching didn't worked of course. The game worked before this. So I cancelled and reloaded the project, launched, everything is fine. I've only replaced the name of sounds. Anyone had this?
     
  23. NeonBits

    NeonBits Member

    Joined:
    Sep 22, 2017
    Posts:
    280
    Sorry, this time it was me; I've added again the files, clicked "check all scripts" after each one, and suddenly had four errors "variable name expected"; the problem was the name of the file being the same of a variable.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice