Hi guys! I've been a long time Gamemaker user (since gm6) but have only recently joined the new forums here. So thank you in advance to anyone who's willing to help me out!
Introductions aside, I've been having an issue that's been bugging me for a week.
First, here's a little pretext on what...
Alright, I'm making some buttons for a start menu. The buttons themselves are aren't drawn, but their text is. I tried to resize the buttons to match the size of the string they hold. My resize code is:
//in the create event
image_xscale = string_width_ext(button_string, -1, -1) /...
Hi,
so im trying to write a text !@#F!@E! and turn that text into real numbers like this
!=5
@=6
#=120
F=12
etc.
this idea came from the fact that the characters in the font are numbers and what i tryed is
stats=chr(5)+chr(1)+chr(12)+chr(42);
and then im not sure how to turn those characters...
Hello everyone
Is it possible to read the whole number not just the first number that comes after the "\"
Because I want to have more than 10 modifiers and i don't want to make it into a string so i can use letters as well is there any possible solution?
EDIT: btw. "i" is the current...
Note: I'm using GM 6.1. I know it's outdated, but because I started this game project using 6.1, I'm also going to finish it with it.
I think this topic has been posted about before, but I can't find anything relevant. Maybe I just don't know what keywords to search for. :confused:
Anyway, in...
i have a string:
str = "FIST KNIFE SHOTGUN";
I have a substring:
playerText = whatever the player is typing into the input field.
ex: playerText = "FIST";
I want to be able to know if the player has typed either FIST, KNIFE OR SHOTGUN into the input field
without having to do this...
So my game is a choose your own adventure style game where the player makes decisions and depending on those decisions they go to certain rooms. I'm trying to make it so theres a string which checks which decision you made and then adds it to an existing string, which then prints on an end...
This should output the same but it doesn't!
show_debug_message("Hi everyone\nHow are you");
show_debug_message(@'
Hi everyone!
How are you?
');
First one outputs correctly:
Hi everyone!
How are you?
Second one doesn't output correctly:
Hi everyone!
How are you?
It adds one extra new...
I am trying to change a number value into its corresponding character hexidecimal value for use as my own custom file encryption. I am trying to figure out if there is a possibility to assign a string to a hexidecimal like so:
"00F8" into $00F8
These are NOT colours by the way. They are...
While we are in a time period where additions to standard function library can actually happen, I'd like to propose several string functions to bridge some gaps in compatibility with common APIs:
string_pos_ext(substr, string, start)
Much akin to regular string_pos, but with a specifiable...
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...
Hello GMers !
I'm trying to sort a classic ds_grid using this:
0 STR1 STR2 STR3 STR4
1
2
3
4
5
...
All cases countain uppercase strings.
I want sort the grid from the 1st collumn called STR1
I tryed to convert strings to real but i think i missed something to have a good result.
Some...
Hello, I wanted to know how i could take a string, for example
"Hello" and convert it to bytes "33749023" ?
I saw this one example posted by someone on reddit
seed = 0;
s = "my string seed"; for(var i=0; i<string_byte_length(s); i++)
{ random_set_seed(seed); seed =...
Greetings.
First of all, I am fairly new at Gamemaker and I am not quite accustomed to it yet.
I have looked over google, many websites, this forum and tutorials and I can't seem to find an answer to what I wish to accomplish with Gamemaker. First of all: My game will be text heavy, but it is...
Hi,
i was wondering is it possible in gms to set colour within a string, somthing like this
'hello [col=red]world[col=white], how are you?'.
so basically only the word 'world' is red. somthing like what you can do in the forum.
setting the color with a function doesnt work for me cus im...
Hi everyone,
I am currently working on a math game where the player can insert equations and the game draws them (like x^2+5x+2). For that purpose I need to somehow convert the inserted equation from a string to something you can calculate with. Any ideas?
In a nutshell:
My code contains an error that the game does not recognice as an error.
(click to zoom)(original)
In the first picture, I have the autofill function off. So I can with my left mousebutton write those cells, and change the color with wheel. [0 = none, 1 = black, 2 = gray, 3 =...
Is there any easy way to reference an enum value using a string? For example:
Script:
///get_enum(string)
var a = get_enum_from_string_here("item.sword_bronze");
return a;
As in, pass a string and return an enum with the exact match.
Like in the example: I passed "item.sword_bronze", and want...
Hi everyone
I'm reading from an XML file and I need to remove the "special" characters for a carriage return and tab. I am attempting to do this with the following line:
string_replace(temp, '\t', '');
string_replace(temp, '\r', '');
however I don't think that gamemaker recognises tab as...