Antikore
Member
I'm trying to make a minecraft-like seed system where you can type some kind of text string and it will be converted to real and afterwards the seed will be set. However, seems I'm doing something wrong with the converter. I didn't follow any tutorials so my code might be completely stupid, I'm aware of that.
The final result is always getting 48 as final seed number, that represents 0 on ascii
This is the converting code in async dialog event
This is the input code:
I'm using Windows 10
GameMaker: Studio v1.4.1804 (Standard Edition)
Any help will be apreciated
The final result is always getting 48 as final seed number, that represents 0 on ascii
This is the converting code in async dialog event
GML:
txt = "";
for (i = 0; i < string_length(input); i++) {
txt = string(txt)+string(string_ord_at(input, i+1));
}
global.seed = real(txt);
room_goto(rm_playscene);
GML:
txt = "1";
input = get_string_async("Set a game id (Your friend should use the same id or you may have errors)", "TaterIsAPotato");
GameMaker: Studio v1.4.1804 (Standard Edition)
Any help will be apreciated