value

  1. E

    Windows [Solved] - Global Var doesn´t have the actual value

    Hi there, i have a confused issue. here my code: scr_revice_msg() ... case 7: var player = buffer_read(buffer, buffer_u16); scr_get_states(player, 1); scr_server_send_data(1, targetsocket, 7, global.exp); break...
  2. sinigrimi

    GMS 2 [solved]removal from instance_create script if the object was destroyed

    Hello! When I enter the room, it reproduces the blocks, but when I move to the next and return to the first, nothing is reproduced in it :( p.s .: rooms are not from GM but are generated in the same GM Room after moving outside the camera. I would also like to know if I can mark these objects...
  3. Smenkare

    (solved)getting index from ds_list

    Create event exampleList = ds_list_create(); ds_list_add(exampleList,1); ds_list_add(exampleList,10); ds_list_add(exampleList,10); ds_list_add(exampleList,30); choice = 0; weight_sum = 0; for(var i=0; i<ds_list_size(exampleList);i++) {weight_sum += exampleList[|i]} Draw event if...
  4. T

    Circular Charging gauge

    hello, this is mainly to see if im going in the right direction. So Im trying to create a gauge for the player and enemies to share. Once they hit certain spots in the gauge they are able to take certain action like in a rpg. But my problem is setting up the values for diameter ...
  5. M

    Android Error parsing

    Hi. It has been a while since I updated the gm2. Today I update it and I get an error when compiling (image attached). In the line that marks me error is the "if" number 250 of the object or the "switch (xx)" number 250 of the object. Can anybody help me? Regards, Mataca
  6. Architheutis

    Givin´ the instance another hsv (SOLVED!)

    Hi Folks, a little queston: I have certain levels in night ambience. Therefor I changed my player-instance`s hsv in that level, manually. But naturally, if my player gets assgrabbed by enemies or harmful objects, the k.o.-animation and the reanimated player idle don´t keep the manually...
  7. Edwin

    Multiple script arguments malfunction.

    Hello, guys. I made a script that has multiple arguments, it looks like this: /// val_highest(value1, value2, value3, ...) for (var i = 0; i < argument_count; i ++) { for (var j = 0; j < argument_count; j ++) { if (argument[i] > argument[j]) { return...
  8. I

    GML [SOLVED]Variable changes back to old value

    I have score variable(well the variable is actually named scr) which i want to add one point to itself when another variable(called fallen) is equal to true. The problem is that when the variable goes back to being false my score variable also goes back to its old value (aka zero). Why is that...
  9. M

    Check the value of a variable in a specific instance

    Hi there! After reading a lot of thread about similar problem I still can't figure it out how can I check a value of a specific instance and do an action. That's my code. It works but it's always goes to Option room and never in Atrio room. if mouse_check_button_pressed(mb_left) {...
  10. S

    Starting an alarm after variable value has changed

    Been at this for months, still cant find an answer. I have a variable global.spawner, and it is set to 1. After pushing a button the value goes to 2. Once the value goes to 2 I want the next alarm (alarm 1) to start. This will repeat as the values get higher. Right now Alarm 0 starts once the...
  11. M

    values and changing them.

    Hey everyone, I am still new with game maker can you help me understand how the variables work?. For example when I change a value in an if statement, the stays changed even if the statement if over and false. Example if(hp == 1) { jumpspeed = 8; movespeed = 30; acc = 2...
  12. Z

    Add A Value To A Variable [SOLVED]

    Hi everyone ! For an integrated variable as "x", "y", or "depth", if you set : "that_variable" = "that_variable" +- "value" It increase or decrease with a speed of "value". My question may seem a lil silly, but I'm unable to simply add a number to theses variables. (Don't think that's the...
  13. G

    Variable Value Detecting Help

    I am creating a game, where you click on an object to earn money. I have the counter working so that it adds every time the object is clicked. What I want to do next, is have an image pop up when a certain value is reached. Example, when the counter reaches 100 or something like that. So I guess...
  14. J

    Smooth transition camera

    Hello, I have a problem. I have a big room of 3840*2160, and a view of 1920*1080 (at the top-left of the room), i want to make a smooth transition to the top-right of the room smoothly, when I click on a button. All of tutorials do this but with a view that follow the player,i don't follow...
  15. Silversea

    Legacy GM "string_width" calculating wrong value?

    Perhaps someone with more experience could explain what is happening here, and how to correct it. I'm assuming it has something to do with spacing of the characters in the font not matching with the actual draw length. The actual draw width of this text is 153 pixels, but the game says it is...
  16. S

    Question - Code Solved - Script passing value to variable?

    Using GM2 Simple question (I hope): Similar to how you make an array change in the script and also change it's value in the object calling the script, can the same thing be done for a variable? My question lies in this example code: <object> scr_test(my_array, my_variable); <scr_test> var...
  17. jobjorgos

    Legacy GM how to reset values of a 3D array

    Whenever I touch a fish item in the game, it get automatilly picked up to my bag if I got free inventory space with: scr_pickup_item3 (this works fine). Whenever I press 'U' it should eat the fish, removing it from my bag with scr_remove_item3. Somehow scr_remove_item3 is not working, the fish...
  18. Fixer90

    Legacy GM array_create problem [SOLVEDish]

    The syntax in the documentation for array_create is array_create(size, [value]); The [value] part lets me set a default value for every variable in the array. However, despite the documentation clearly saying I can do this, I get an error when I try to put something in the value slot. I even...
  19. Luke Pierson

    DS Lists: find value and not position

    hey all! In my game, enemies will respawn if you use a checkpoint. Otherwise, enemies stay dead. Initially, I was using persistent rooms, but decided to go another route because I like to have control over the things happening within my game. Anyways, I decided to create a DS_list which...
  20. XirmiX

    GML Is it possible to create a variable with a name that is the value of another variable?

    For my game that involves networking, all I've been doing in terms of vital data storage and retrieval is just create some ds_maps (They may be tedious sometimes, but I like them, now that I fully understand them) and store various pieces of data as keys and their values in various different...
Top