script help

  1. P

    GMS2.Issue with moving circles collision

    I have an issue with collision checking of circle instances, actually it just doesn't work and collide_object=noone in any case, also importatnt thing is that i don't know why but x always= chobj.x Important thing:Object doing this script is also a child of Pobj_circle So this is my GMS 2 script...
  2. I

    GML [SOLVED] Script Issues

    So, I decided to learn about GMS2's scripts, and after figuring out it's GML's version of functions, my first thought is to move collision code into one. For a reason I can't figure out though, it's behaving differently despite being the same code. Mostly, you get stuck in 45 degree slopes...
  3. P

    Script executes for a couple of seconds and then stops [SOLVED]

    This code is the idle animation of my character when he isn't moving it wil execute this code but after a while the arm_move_down script wont be executed anymore. if (xmove == 0 && vsp == 0) { sprite_index = player_idle_sp; image_speed = 0.05; if (floor(image_index)+1 ==...
  4. Lenchantin

    GMS 2 Need help with layer_get_all_elements() [SOLVED]

    Hey all. We're trying to make something where, when an event is activated and a script is called, the script searches out all of the objects on a layer, they look for a specific variable inside of the variable, and if it's there, it changes the variable. The idea here is that the script...
  5. Ephemeral

    GML non-linear interpolation, or SLERP()

    (I know, technically, it should be "serp" and not "slerp" but "slerp" is more fun to say.) Anyway, after several hours of reading wikipedia and playing with graphing calculators, I'm admitting defeat and posing this problem to the community. I've drawn out a diagram to help visualize what I'm...
  6. G

    Design Best Way Of Storing Lots Of Strings?

    Howdy All! So, I have a quick design question regarding the storage of lots of strings for my game. And I'm talking like... 60K words-worth of strings that pop up in separate pages. Now, I've dabbled in storing them in files, but loading and processing them is kind of a pain. So, ignorant as...
  7. W

    GMS 2 Animation[Solved]

    I have this script and it's not working PLs help me The script is in my player movement script witch is in my players step event. sc_animation: // Left or Right if (xprevious < x) { image_speed = 1; sprite_index = sp_player_right; } else if (xprevious > x) { image_speed = 1...
  8. Leon Hurley

    [Solved] Why do scripts break my ds_list saving system?

    [Currently using GM 1.4] I have a simple saving system that uses 0s and 1s to record if the player interacts with objects (opens a door, picks something up etc). To avoid coding each save individually I pass arguments from a save object in each room to a script, defining the save file name, the...
  9. K

    GML [Solved]Problem: Same Type Objects not all being affected by script/instance_exist check

    So the issue is that when I create an object called obj_slow_time, it is supposed to slow all enemies down to 20% then reset them back to their original speed when the obj_slow_time destroys itself. However, when obj_slow_time is created in the room, it only slows down a single (first enemy of...
  10. C

    Play Animation While Object is Moving

    Okay so I'll keep this as basic as possible, but I'm trying to animate my player character so that the animation only plays while the character is moving. I have seperate sprites for left, right, up, and down, each with their own animations. I've set each keyboard button to transform the front...
  11. F

    Code Bug (Doesn't seem to the read code)

    I have been making a Turn Based Strategy game, and the game was working fine, and then I made some changes to other elements, and suddenly now there is a weird issue when it reads the code. The error given is this: ====================================================...
  12. A

    [SOLVED] - Scr showing as Orange (not blue) and won't execute in event

    Hello. Thanks kindly in advance for anyone reading this, and especially if you can help. I did try searching forums for "script not executing" or "script won't work" etc... but couldn't find a previous thread that helped. So I decided I'd ask. Problem: Attempting to execute script in a...
  13. K

    Legacy GM Generate Instance at Specific Tile Script

    So I have been making my game when I realise how tiresome it is to place my "wall" objects, then I thought, is it possible to create a script to run when the room is generated that it will check the index of the tileset (like the walls are [0,0] and floors are [0,1]) and have it create obj_wall...
  14. L

    Legacy GM Sprite creating multiple instances and slope 45 degree not working ...

    (re)EDIT: Found the issue. Apparently if one does not draw a background color, there will be this instance of the object shadowing itself. Oddly not documented anywhere, so. That fixed, on to the next bit.
Top