mafon2
Member
Ok, I'm trying to make a simple stacking game, but every simple thing you don't notice requires a code explanation for the machine.
So I want to check the preasure on blocks, mostly to know which one is the highest one, so you can grab it, but I'm also thinking it could be useful to make fragile blocks or preasure buttons / scales, that sort of thing (1 block = 1 preasure).
I was dancing with a tambouring for quite a vile (my usual practice) and I've got some interesting results sometimes (pretty close, but no cigar). For now code looks like this:
Create
Step
It creates columns of 1s with 0s on top and it's ok, but after I move some of them it produces
nonsensical results.
Works ok for the grabbing part, but it's not enough for preasure measuring.
...
Any help will be appreciated.
So I want to check the preasure on blocks, mostly to know which one is the highest one, so you can grab it, but I'm also thinking it could be useful to make fragile blocks or preasure buttons / scales, that sort of thing (1 block = 1 preasure).
I was dancing with a tambouring for quite a vile (my usual practice) and I've got some interesting results sometimes (pretty close, but no cigar). For now code looks like this:
Create
Code:
preasure = 0; // To know how much blocks lie on it
preasure_check = 0; // to stop/reset preasure checking... it was used more frequently, but it's lost the purpose.
Code:
if (preasure_check = 0 )
{
if (place_meeting(x,y-gridSize, obj_block))
{
preasure = other.preasure + 1;
}
if (!place_meeting(x,y-gridSize, obj_block))
{
preasure = 0;
}
}
It creates columns of 1s with 0s on top and it's ok, but after I move some of them it produces
nonsensical results.
Works ok for the grabbing part, but it's not enough for preasure measuring.
...
Any help will be appreciated.
Last edited: