A
ASOBU
Guest
thank you open this thread. I m bothering to an error that object Crops_system's roomWidth and roomHeight in Room_start.
Allow me to use odd English.
Now I reference from FriendlyCosmonaut Part8. I don't have any idea to solve the error aleady.
I tried to change "roomWidth" and "roomHeight" to room_width and room_Height. But it did not work. And I had been looking for a solution from Youtube comments.
Could someone please help me
Allow me to use odd English.
Now I reference from FriendlyCosmonaut Part8. I don't have any idea to solve the error aleady.
GML:
oCrops_system
------------------------Roomstart
//[P8]17:20
if (room == rm_1 and ds_crops_instances == 0)
{
ds_crops_instances = ds_grid_create([COLOR=rgb(226, 80, 65)]roomWidth[/COLOR] div cellSize, [COLOR=rgb(235, 107, 86)]roomHeight[/COLOR] div cellSize);
}
<oGame>
----------------------------------------RoomStart
//to set cell---[FC:P8]2:55
roomWidth = room_width;
roomHeight = room_height;
if(spawnRoom == -1) exit;
oPlayer.x = spawnX;
oPlayer.y = spawnY;
oPlayer.facing = spawnPlayerFacing;
with(oPlayer)
{
switch (facing)
{
case dir.left : y_frame = 1; break;
case dir.right: y_frame = 0; break;
case dir.up : y_frame = 2; break;
case dir.down : y_frame = 3; break;
case -1: x_frame = 0; break;
}
}
-------------------------------Draw
//Debug
if (!debug){ exit; }
with(oCOLLISION)
{
draw_rectangle_color(bbox_left, bbox_top, bbox_right, bbox_bottom, c_yellow,c_yellow,c_yellow,c_yellow,true);
}
with(oPlayer)
{
draw_rectangle_color(bbox_left, bbox_top, bbox_right, bbox_bottom, c_yellow,c_yellow,c_yellow,c_yellow,true);
}
//[FC:P8]5:00
var xx = 0;
var cs = oCrops_system.cellSize;
draw_set_alpha(0.3);
//[FC:P8]
var repeating = roomWidth div cs;
repeat(repeating)
{
draw_line_color(xx, 0, xx, roomHeight, c_yellow, c_yellow);
xx += cs;
}
var yy = 0;
var repeating = roomHeight div cs;
repeat(repeating)
{
draw_line_color(0, yy, roomWidth, yy, c_yellow, c_yellow);
yy += cs;
}
draw_set_alpha(1);
I tried to change "roomWidth" and "roomHeight" to room_width and room_Height. But it did not work. And I had been looking for a solution from Youtube comments.
Could someone please help me
Attachments
-
55.6 KB Views: 11