rookie asks for help part IV

netoxinaa

Member
hello everyone and welcome to a new episode of rookie asks for help,
i wanted to do a wall object so that it stops the player when collided with it, this wall object I did it as a 1 pixel size so that i can place many in the room the way I want, but when I drag the object to the room, i cant place more than one in a 32x32 grid, it just places it in the top left corner, even tho the object canvas size is also 1 pixel lenght, anyone knows how to handle this? my room size is about 200x150
thanks
 

Slyddar

Member
You need to turn the grid off to allow movement off the grid. Shortcut is G, or there is a little icon for it in the room editor.
May I ask, is there a reason you want to stack 1 pixel wide wall objects, as opposed to a single object dragged to be the size you want?
 

netoxinaa

Member
You need to turn the grid off to allow movement off the grid. Shortcut is G, or there is a little icon for it in the room editor.
May I ask, is there a reason you want to stack 1 pixel wide wall objects, as opposed to a single object dragged to be the size you want?
well, my room is like this,
i was thinking in placing every obj_wall between the walls and the floor (where the black borders are lol)

or do you know of a better way? :s
 

Attachments

D

Danei

Guest
If I were doing something like that I would probably try to constrain the valid coordinates for the instance to a trapezoid with math. If I couldn't figure that out, I'd try triangular collision objects with precise collision checking on. Having a ton of different instances all running collision checks is usually worth avoiding, imo.
 

Slyddar

Member
i was thinking in placing every obj_wall between the walls and the floor (where the black borders are lol)

or do you know of a better way? :s
It depends how you are doing your collisions, but utilising parenting you could make your wall objects any shape, and just enable precise collision masks. Draw a wall object the size of the left wall, and make it a child of your wall object, or even better create a parent wall object that you make all wall objects children of, then ensure your collision checks work against the parent.
Place the new wall object on your solid/collision layer, which of course will be hidden when the game runs, copy it and flip it for the other side, and just add a huge rectangle for the top wall. Whole thing can be done with 2 objects, 3 instances.
 
Top