ReikonMage
Member
Hello,
I have been trying to make a tactical Rpg game similar to Final Fantasy tactics or Devil Survivor. But drawing a grid using a sprite is providing me troubles. In context, I have a sprite that I made to resemble the grid. The code I have should draw the sprite-like a grid when it hits the collision box. But it just draws it diagonally and ignores the IF rule I put. I looked all over the internet for someone who had the same problem but no avail. Each cell should be 64x64
Here is the code in a Script I have
I have been trying to make a tactical Rpg game similar to Final Fantasy tactics or Devil Survivor. But drawing a grid using a sprite is providing me troubles. In context, I have a sprite that I made to resemble the grid. The code I have should draw the sprite-like a grid when it hits the collision box. But it just draws it diagonally and ignores the IF rule I put. I looked all over the internet for someone who had the same problem but no avail. Each cell should be 64x64
Here is the code in a Script I have
Code:
if (Selected){ // Selected is a bool I have for when a character is selected
for(var i=0; i<= max(room_height, room_width); i+=64) {
if place_meeting(x,y,CgroundO){ // CgroundO is a Object collision box that the grid should draw on top of.
draw_sprite(GridSpr,1,i,i);
}}}
Last edited: