1. huenix

    Issue removing spawn point form available list after taking it

    I am trying to make it so a connected player spawns on an available starting spot (its a board game). It currently works to place them at random points, but they CAN over lap players, i don't want that. How do i remove the available spawn point after "ojb_player" is crated at x/y? if (type...
  2. sinigrimi

    GMS 2 Need help with "switch"

    Sorry for the stupid question, but I need to know how to make the analogue && (and) from the if system in the "The" Switch "Statement" system. I seriously don’t know. I need to test 2-4 events at once, but I want to do this in the "switch" system
  3. Cofefe

    Question - Code Switch Statement Compile Error

    Hi all! So today I thought I'd try something with Switch statements, I figured it wouldn't work but I didn't expect the error I got. All I did was put the "Or" Operator in the cases (||). You can see the code below: ///@description horizontal_tile_collisions() var grounded =...
  4. ac585318

    Question - Code Do case statements require curly braces?

    I'm new to GMS2 and am curious... Do case statements require curly braces? I've seen been going through tutorials and some of them are using curly braces in the case statements and some not. I breifly read that apparently in the C programming language they are needed for declaring variables in...
  5. S

    GMS 2 can I put a switch inside of a switch?

    if (daycycle.hours >= 24) { dialouge_choice = irandom(1); switch(relationship_Level){ case 0: switch(dialouge_choice){ case 0: text = ["Hello."]; case 1: text = [...
  6. M

    GMS 2 (HELP) switch statement with range of numbers as a case

    im sorry my english is kinda bad, ill try to explain what i need as simply as i can: i want one of the cases in a switch statement to happen in a multiple situations. i want to write something like this (just as an example), but of course it is not how it would work: switch (anim) { case 1,2,3...
  7. Mythi.T

    GML [SOLVED] Is GML case-sensitive?

    I want to make a non-"draw_text"-text display-er. I don't know if lowercase letters should be considered to be displayed. Simple question to solve this, Is GML case-sensitive? Can GMS 2 Detect a case different in variables and strings? Example: string = "A" if string = "a" { x = "true" }...
  8. MartinK12

    GML [SOLVED] How can I use object name in switch statement?

    I've created this simple code and depending what kind of object is selected I want to perform different actions on it, but looks like I always get default case. I don’t know where I messed up? Thank You for pointing my mistake :) if mouse_check_button_pressed(mb_left) { instance =...
  9. XirmiX

    GML Can a case in a switch statement be checked for "noone"?

    Cases in switch statements need to be a number, be it 0, positive or a negative number, or it can be set to default... The "noone" declaration, refers to a null or empty variable. If I used a switch statement, could I have a case for if it is unset? It could allow me for some pretty...
  10. C

    Can't escape from my switch-based textbox

    Hi, I've made a working system so my player can talk to npcs, there's just an issue or shutting it at the end. This is my code: draw_self(); if (show_text = 1) { var str; switch (line) { case 0: {str = "Four lines of text " + string(line) + " lineys"...
  11. XirmiX

    GML [Solved] Can a case in a switch statement have a negative value?

    Quick question, since I don't want to write a whole bunch of code having these values set up and then it turning out to not work. Essentially, I want to know whether something like this: switch(some_thing) { case 1: break; case -1: break; } Is that okay, or a no-go and...
  12. A

    GML How many cases can be in a Switch statement?

    Is there a built in limit, or a practical limit (causes slow down), to the number of cases that can be in a switch statement? does it matter where the switch statement is (like in a step event vs a draw event)? the player in my game has a complex set animations/states and gear you can see, and...
  13. A

    GML Case statement not in manual?

    Am I the only one who cant find anything on "case" in the manual? i searched for it in the manual and middle mouse clicked on "case" in game maker and still nothing. any help?
  14. M

    Showing sprite

    Hello everyone! Few days ago I have an idea to make an clicker game with case opening. Everything goes without any problems till now, where I cannot show sprites in room. I make most of my code in room's creation code, but when I try to make some sprites using "draw_sprite" they simply didn't...
  15. A

    Simple Menu Problem

    I'm just starting out with Game Maker so I am using tutorials to learn how to do everything. I've managed to make a simple Yes/No pop-up menu that comes up in my game. It's designed for planets on a solar system map. When the player runs into a planet the planet creates an instance of this menu...