value

  1. XirmiX

    GML [Solved] Is it possible to set one object's direction to another object's phy_rotation?

    Currently I have set up physics for the client. The server responds with the instance equivalent moving anywhere where the client's object goes (declaring the x and y position to be that of of the physics object), however the same case is not for rotation. Physics use phy_rotation instead of...
  2. 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...
  3. Misu

    Legacy GM [SOLVED] buffer returning incorrect value

    This is not the first time I encountered this problem. The few times I had were just part of some random experiments with GMS 1.4 (also in GMS2). But NOW it is happening for my team's game project and its a must fix now. I cant seem to know why or what is wrong ... I store a buffer value that...
  4. M

    GMS 2 Max Value which has subordinate random values.[Solved]

    Hello Guys ;), I want to make a program code who allows to make a maximum value for subordinate random values. I don't know how to explain it so i have here a example. The subordinate random values should result 10 at least. (10 is the max value).(10 should be changeable). Thx for the respond...
  5. P

    Live variable shower

    Hey, is there a way to show the values of variables live while the game runs?
  6. zendraw

    Legacy GM Sprite identifying

    so i figured the only way to identify a specific sprite in the resourse tree wuld be with sprite_get_name() but how do i return that string into a real value which then i wuld use to assign that sprite to an object? in the manual is suggested sprite_get_index() but such a function doesnt exist...
  7. E

    getting value sform nearest instance/changing nearest instances values

    this is the code in a game im working on. why is it broken? //weapons calculations instance_nearest(x,y,action).HP += -1.5*(Weapon/action.Armour) Hit = random(100) if Hit = 1 then instance_nearest(x,y,action).Nav += -0.1*(Weapon/action.Armour) if Hit > 10 then...
  8. E

    [SOLVED] Colour values

    No matter what this always returns a 0. >global.valueTotal = 0; >currentPos = draw_getpixel(xPosition, yPosition); >global.valueTotal += colour_get_value(currentPos); I have tested this with all the pixels from this test image. (image will be uploaded in a moment, the upload at image button is...
  9. David Richard

    [SOLVED] image_index gives decimal values???

    Game Maker Studio 1.4.1753 When running a game and checking image_index in the step event of an object, I get a decimal value as an image index? How can that be? I cannot have 0.2 of an index in a sprite that has 6 images??? I attached a picture of the dubugger as a proof. Can someone clear...
  10. Shadowblitz16

    Legacy GM move value towards value without lerp

    can someone help me I'm looking for a way to slowly move a value towards another value at a set speed I would prefer to use something that uses one line of code if that is possible I do not want to use lerp because it has problems reaching the target value(please do not argue with me on this)...
  11. G

    Writing then Reading URL Information

    I am going to write the code and the questions I have correspond accordingly. Let's say I have two objects... object_writer Create Event: http_post_string(/*QUESTION 1*/, 123); object_reader Draw Event textToRead = /*QUESTION 2*/ draw_text(x, y, textToRead); Question 1: What is an example...
  12. zendraw

    Legacy GM Get colour from sprite

    Hi, so im trying to get a certain colour from a sprite lets say the green colour and lets say with the lowest value. how do you do that?
  13. XirmiX

    Legacy GM Check for a string in a text file?

    So, I looked through some text file and list commands and read a bit about them. For some reason I can't figure out how to code it so that the program checks whether the 0th, 1st or whichever line has a certain text in it. I know that's not what text files are really for in and of themselves...
  14. A

    How to check for variable inside one of many instances

    Hi everyone, I have a question that's been lingering inside my head for some time now. I'll try to put this in layman's terms because I don't know how ask it any other way. Suppose you have 3 instances of a certain object (we'll call it "obj_cake"). Each instance has a variable "num" and each...
  15. J

    Trying to get health bar to normalize a value

    So here is the problem I am having. I watched this video: GameMaker - Custom Healthbars In the video, he explains how to make a healthbar. His healthbar went off of a health value that was maxed at 100, so he showed that you need to draw the healthbar as your health value divided by 100, making...
Top