Pfap
Member
[SOLVED]
I'm pulling values from a grid and then pushing them onto a stack to be pulled from later. I have 6 values and I'm trying to figure out if there's a way to combine them to form a pattern?
a = 1
b = 2
c = 3
pattern = a+b+c
I want to somehow end up with 123 and not 6.
Or maybe a different data structure would be a better choice?
I'm using the grid to draw my objects in there positions and the stack to keep track of where they are.
create event:
a = grid_index[# 0, 0]
b = grid_index[# 1,0]
c = grid_index[# 1,0]
stack = ds_stack_create()
alarm event1:
ds_stack_push(stack,a)
alarm event2:
ds_stack_push(stack,b)
alarm event3:
ds_stack_push(stack,b)
step event:
pattern = a+b+c
Any suggestions?
I'm pulling values from a grid and then pushing them onto a stack to be pulled from later. I have 6 values and I'm trying to figure out if there's a way to combine them to form a pattern?
a = 1
b = 2
c = 3
pattern = a+b+c
I want to somehow end up with 123 and not 6.
Or maybe a different data structure would be a better choice?
I'm using the grid to draw my objects in there positions and the stack to keep track of where they are.
create event:
a = grid_index[# 0, 0]
b = grid_index[# 1,0]
c = grid_index[# 1,0]
stack = ds_stack_create()
alarm event1:
ds_stack_push(stack,a)
alarm event2:
ds_stack_push(stack,b)
alarm event3:
ds_stack_push(stack,b)
step event:
pattern = a+b+c
Any suggestions?
Last edited: