Hi guys,
I can´t wrap my head around, what seems to be a very simple problem.
I want a variable to rise by 1, every time I visit a "location" in my ds_grid.
But a simple if-structure in the step event would raise it every step, as long as the condition is met.
I can get it to rise once, and once only but how would I achieve a stat tracker, every time I visit a location.
Currently I fiddle around with a ds_grid like so:
Thanks in advance, and sorry for what seems to be a day-1 problem 8)
I can´t wrap my head around, what seems to be a very simple problem.
I want a variable to rise by 1, every time I visit a "location" in my ds_grid.
But a simple if-structure in the step event would raise it every step, as long as the condition is met.
I can get it to rise once, and once only but how would I achieve a stat tracker, every time I visit a location.
Currently I fiddle around with a ds_grid like so:
GML:
//Create event
my_map = ds_grid_create(3,3);
ds_grid_add(my_map, 0,0,"Forest");
ds_grid_add(my_map, 1,0, "Village");
ds_grid_add(my_map, 2,0, "Forest_2");
ds_grid_add(my_map, 0,1, "Cave");
ds_grid_add(my_map, 1,1, "Castle");
ds_grid_add(my_map, 2,1, "Desert");
ds_grid_add(my_map, 0,2, "Chasm");
ds_grid_add(my_map, 1,2, "Camp");
ds_grid_add(my_map, 2,2, "River");
xx = 0;
yy = 0;
//step event
if keyboard_check_pressed(ord("D"))
{
action_text = "You walk East...";
xx = xx + 1;
}