Using a Convert method is more useful for general objects that implement IConvertible. It's slightly more efficient and straightforward to call a TryParse method (for example, int.TryParse("11", out number)) or Parse method (for example, var number = int.Parse("11")). I had to find it in a decade old forum post.You convert a string to a number by calling the Parse or TryParse method found on numeric types ( int, long, double, and so on), or by using methods in the System.Convert class. Boy that was annoying, since literally none of the descriptions mention this. I'm sure there's a technical reason why, but I ended up needing asset_get_index. Turns out that Gamemaker does something silly where it converts object names into numbers. Show_debug_message("Saved " + string(name) + " object.")Įdit: I ended up solving this. Ini_write_real(name + string(numb), "y", id.y) Ini_write_real(name + string(numb), "x", id.x) Show_debug_message("Saved " + string(numb) + " " + string(name) + " object.") Ini_write_real(name + string(i), "y", id.y) Ini_write_real(name + string(i), "x", id.x) Var numb = instance_number(object_index) Var name = object_get_name(object_index) Var savefile = ("save" + string(global.gameSaveSlot + 1) + ".ini") why is it doing that? It says the error is the with (name) line but I keep changing things (and I've tried other loop types) but nothing's working. If there's more than one instance, it does another with loop and writes that info into the file, incrementing each time so it doesn't write over the same info, before writing the other object coords.Įxcept I'm getting an error where Gamemaker can't convert a string into an integer. First, get the name of every object, one at a time. Some objects have more than one instance, so I made a loop in a loop. It takes every object in the game and saves the x and y coordinates to an ini file. The next gm(48) will take place on Oct 20, 2018. The gm(48) is a casual, fun game jam that helps you to learn and grow as a developer. Shining a light on high-quality projects and resources created by our community.įor more than 8 years, the tight-knit community of /r/gamemaker has run the game jam gm(48) for GameMaker developers of all ages and experience levels. Share the latest pictures and videos of your gameĪre you in need of motivation? Then take a stab at these creative challenges. Scheduled content ScheduleĪsk questions, ask for assistance or ask about something else entirely.ĭiscuss game design and game development. Join in the conversation, get help with any issues you might have and connect with your fellow developers! We also have a Steam Group for playing games. r/gamemaker sponsors three chat-rooms: IRC, a Discord server, and a Slack team. Content must be appropriately flaired at the time of submission.Technical support requests are to be directed to YoYo Games Support.Promotional content must contribute to the community.Show respect to all users of the subreddit and have patience with other users when providing help.Content must demonstrate a previous effort and research before posting and must provide adequate detailed information.Content must not use "click-bait" titles, shortened links, or solicitation.Content must not be obscene, illegal, racist or offensive.Content must be directly related to GameMaker.subreddit_guidelines()Ĭontent that does not follow the subreddit guidelines is subject to deletion, so please become familiar with them. Additionally, experienced coders can take advantage of its built in scripting language, "GML" to design and create fully-featured, professional grade games. It features a unique "Drag-and-Drop" system which allows non-programmers to make simple games. GameMaker is software designed to make developing games easy and fun. The Essential Gamemaker Functions, Concepts, and Tools Guide. GameMaker Handbook - The Ultimate Resource for Beginners.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |