I have a 2D array that I'm searching using a function. The array:
global.list_rooms_bot_bomp[0,0] = rm_Level4;
global.list_rooms_bot_bomp[0,1] = 1;
global.list_rooms_bot_bomp[1,0] = rm_Level5;
global.list_rooms_bot_bomp[1,1] = 2;
etc. ...
The function takes room and returns the corresponding...
edit: modified title to reflect forum rules
Hey everyone, long time lurker first time poster...
I've been playing around with GM for a month or so, and have built a basic top down project, to learn the ropes. What I'm looking for a bit of feedback at some of my code regarding NPC/enemy...
I need to know, arrays, I think I like to make an 3D RPG for square enix, "CardCraft" a yu-gi-oh based turn based RPG game. you had to ether create your player as a guest with savings (story mode), or an account to play with friends (online). so you can play as your OC (human, bionicle, furry...
So let's say I have a basic array:
example_variable[0] = whatever_1
example_variable[1] = whatever_2
example_variable[2] = whatever_3
My question is, can I use zeroes before the first digit?
example_variable[000] = whatever_1
example_variable[001] = whatever_2
example_variable[002] = whatever_3
Hi all,
I know that arrays are a bit faster than ds_lists, but are buffers faster than arrays?
I know how to use buffers, I'm just wondering if its worth converting all my array stuff to buffers at the end of my development to get optimal performance.
I'm working on save data. But I'm having some errors I don't understand.
I'm trying to save an array into an INI file using this method.
Game Start
if file_exists("save.ini")
{
ini_open("save.ini")
global.array["1"] = ini_read_real("Array", "1", false)
global.array["2"]...
Hey guys, Ctl-F here
So here's my problem:
I have been making a script bundle to add functionality to Game Maker and one of my core purposes is to make it compatible with all versions of Game Maker from version 8.0 and onward. I have spent several days working on this script bundle making sure...
Hi all,
I've got a create event with a bunch of words in an array set up like so,
word[0] = "this";
word[1] = "is";
word[2] = "an";
word[3] = "example";
...
and the idea is that when I type a word in to a box, it checks through the array to see if it exists.
Currently I have the loop as...
I recall that this was brought up during 1.x timeframe but put off, so it might be a good time to bring this up again - it would be pretty nice to have separate object-like value type with convenient dot access.
Essentially, so that you could do, say,
var curvePoint = instance_create_empty()...
Hey guys, im new in the program, and i´ve read a lot of the previews "trying to index a variable which is not an array", but none helped me :(
I have only 1 room 1 object with different animations and stances and 1 script for walking
Object Create event code
//global variable
countStances = 0...
Hi, i have some trouble doing an inventory system for a top down shooter. I watched some tutorials and posts/threads and i can't find one with what i need.
My idea is separate the inventory in primary, secondary, melee and special(Like Counter Strike).
I know it's a way with arrays but idk how...
Hi,
I wonder if there is a simple way to generate random arrays from a group of numbers.
For example I have 0,1,2,3,4,5 and want to determine indexes from those numbers randomly.
I want to create arrays like this:
array[0]= 3;
array[1]=0;
array[2]=1;
array[3]=4;
array[4]=5;
array[5]=2;
or...
This is long, sorry. Also, as a heads up, I'm completely new to programming (dabbling in HTML and CSS doesn't really count).
I've been following Tom Francis' "Make a Game" youtube series, and have been enjoying it so far. Unfortunately I'm currently a bit stuck with arrays. Here's the video in...
tldr; Are there any benefits using 1d arrays over ds_lists?
I came across an old page describing array functions that aren't listed in the manual. While
array_set still seems to work, array_destroy doesn't anymore. So I figured arrays are basicly
a data_structure too.
I'm using array_length_1d...
So I have been making my game when I realise how tiresome it is to place my "wall" objects, then I thought, is it possible to create a script to run when the room is generated that it will check the index of the tileset (like the walls are [0,0] and floors are [0,1]) and have it create obj_wall...
Hello
I'm lost, trying few methods but no progress, I read manual and threads here, but....
Here sample code. This is saved ds_map and json_encode from this map is like this.:
{ "0":
[
[ 1.000000, 128.000000, 160.000000, "obj_man" ],
[ 2.000000, 224.000000, 128.000000, "obj_man" ],
[...
Hi community,
i´m trying something i thought would be simple:
if (argument0 < gMax_Length_Per_Scriptfile)
{
if (argument2 == true) // overwrite line
{
gSCRIPTFILE_ARR[argument0] = argument1;
} else { // insert line
for (cnt=0; cnt<argument0; cnt++)
{...
Hi, I'm having a horrible time trying to get this FOR loop to work correctly, I will explain it first.
What it's supposed to do:
takes segments from an image and draws them in order 1 time to make a complete new image while background_showcolour=false, then a picture is taken of the image...