Hey people, I suddenly realized I wanted to keep on working on games and this time I`ve tried to make an elements sandbox. The only element I`ve made so far was gas, and an eraser. The gas is already nice looking, after two weeks of thinking, but I have a problem with the eraser.
I want it to , first, erase any object that lies near the mouse like this:
Spoiler:
oxo xmx oxo in which m is the mouse, the xs are the elements and the os are blank.
That was ok. But I wanted to make it so that, if you press enter, the eraser is allowed to erase a bigger area, like this:
Spoiler:
oxxxo xxmxx oxxxo with the same meaning of the letters
To solve that, I wrote this code:
Spoiler:
if size=1 { position_destroy(mouse_x,mouse_y) position_destroy(mouse_x+1,mouse_y) position_destroy(mouse_x-1,mouse_y) position_destroy(mouse_x,mouse_y+1) position_destroy(mouse_x,mouse_y-1) }
ps: the function position_destroy kills all instances at the given position(x,y)
Is there any equation that makes it give all values in an area???? That is really hard, if could anybody help I`d be pleased. Thanks for your attention.
_________________ Well hello there! Have a nice day! If you have anything nice to say, please post it on my profile, I will be glad to read You can also PM me. I'm friendly!! (95% of the times... the other times I just bite people, you know)
Ok, it was nice of you to give me a link and it may be useful later, but if you paid attention you would have noticed there are no guides for game maker, therefore making it hard for me to use that.
EDIT: Okay, that problem is gone, but I`ve made an even bigger one and, if anyone wants to help, tell me ;D.
_________________ Well hello there! Have a nice day! If you have anything nice to say, please post it on my profile, I will be glad to read You can also PM me. I'm friendly!! (95% of the times... the other times I just bite people, you know)
Ok, thanks for the effort anyway. You must see i tried not to inferiorize your work, I just meant it couldn`t help in this specific situation. Sorry if I insulted you .
_________________ Well hello there! Have a nice day! If you have anything nice to say, please post it on my profile, I will be glad to read You can also PM me. I'm friendly!! (95% of the times... the other times I just bite people, you know)
No, just finding it out and posting it here I meant.
_________________ Well hello there! Have a nice day! If you have anything nice to say, please post it on my profile, I will be glad to read You can also PM me. I'm friendly!! (95% of the times... the other times I just bite people, you know)
Users browsing this forum: No registered users and 1 guest
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum