script help

  1. I

    Need help with collisions

    Hi, i just started using game maker, very uneducated in it but im trying to learn, and follow along with a tutorial for a game i want to make myself (using the tutorial to learn). I have followed everything done in this video ( ) and as far as im aware, my scripts are identical to his, but for...
  2. M

    GMS 2.3+ Enemy spawner not working

    H,i i'm making a 2d Shoot 'em Up game and i wanted to make a spawner using a script instead of handwritining every single enemy using an object, so i wrote this: function EnemySpawn(_EnemyType, _SpawnDelay, _EnemyCount) { _SpawnDelay -= 1; if ( _SpawnDelay = 0) and ( _EnemyCount > 0)...
  3. Epicrex

    GML How does the updated SCRIPT sytsem work?

    I was doing this thing from an older video and noticed that since then scripts have been reworked. How would I do this with the new(2 months old) script system?
  4. Epicrex

    Windows Script suggestions don't work.

    The red bar at the bottom should say "ScreenShake(Magnitude,Frames)" as a suggestion. I closed and reopend the script and GML, but that didn't help.
  5. Artist Guru Entertainment

    A question regarding a Syntax Error

    Hello, YoYo community i am brand new to the community and at the moment i am having an issue with a line of code from my custom script called addItem as it stands the syntax error i keep getting is Obj_PickUp Collision Event With Obj_Test_Plyr at line 4, 95 : number of arguments for function...
  6. T

    Problem with script

    hello, i'm newbie with gml2, i'm having this problem ___________________________________________ ############################################################################################ ERROR in action number 1 of Create Event for object <undefined>: Variable...
  7. 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...
  8. 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...
  9. 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 ==...
  10. 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...
  11. E

    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...
  12. 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...
  13. 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...
  14. 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...
  15. 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...
  16. 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...
  17. 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: ====================================================...
  18. 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...
  19. 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...
  20. 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.