|
How would one go about making a second item through use of Goodnight's engine? (Aside from needing to allign my menu box with the sprites for the images and vice versa, which I have yet to figure out the code for...
//if inventory[a] = 1 if a=0 or a=4 or a=8 {draw_sprite(menu_items,a,x+(a mod 4)*30+36,y+floor(a/4)*30+z);} else if a>4 and a<8 {draw_sprite(menu_items,a,x+(a mod 4)*30+h,y+floor(a/4)*30+z);} else if a>8 and a<12 {draw_sprite(menu_items,a,x+(a mod 4)*30+h,y+floor(a/4)*30+z);} else if a>0 and a<4 {draw_sprite(menu_items,a,x+(a mod 4)*30+h,y+floor(a/4)*30+z);} pen_color = c_black //draw_sprite(select,-1,x+(global.weapon mod 4)*30+20,y+floor(global.weapon/4)*30)
//if inventory[global.weapon] = 1{ draw_sprite(itemnames,global.weapon,view_xview[0]+209,view_yview[0]-66) draw_sprite(menu_items,global.weapon,view_xview[0]+230,view_yview[0]+45) i believe it is..)
I've succesfully placed the HuD and everything, so that the selected item ends up at the right place, the top right of the HuD. However, how would one use
depth = -15
if deactivated = 1{
if keyboard_check(vk_right) = 1 and global.weapon < 14 {global.weapon+=1; io_clear();} if keyboard_check(vk_left) = 1 and global.weapon > 0 {global.weapon-=1; io_clear();} if keyboard_check(vk_up) = 1 and global.weapon >4 {global.weapon-=4; io_clear();} if keyboard_check(vk_down) = 1 and global.weapon < 14 {global.weapon+=4; io_clear();} if global.weapon>14 {global.weapon=14} brush_color = c_black pen_color = c_black draw_rectangle_color(view_xview[0]-50,view_yview[0]-50,view_xview[0]+400,view_yview[0]+400,c_black,c_black,c_black,c_black,0)
draw_sprite(sprmenu,global.weapon+1,x,y) //draw_sprite(sprmenu,0,view_xview[0]+30,view_yview[0]+40) for(a=0; a<13 a+=1){ if a=3 or a=4 {h=50} else if a=7 or a=8 {h=50} else if a=11 or a=12 {h=50} else { if a>0 and a<4 or a=0 {h=45} else if a>4 and a<8 or a=4 {h=45} else if a>8 and a<12 or a=8 {h=45} } if a>0 and a<4 or a=0 {z=16} else if a>4 and a<8 or a=4 {z=12} else if a>8 and a<12 or a=8 {z=8} //if inventory[a] = 1 if a=0 or a=4 or a=8 {draw_sprite(menu_items,a,x+(a mod 4)*30+36,y+floor(a/4)*30+z);} else if a>4 and a<8 {draw_sprite(menu_items,a,x+(a mod 4)*30+h,y+floor(a/4)*30+z);} else if a>8 and a<12 {draw_sprite(menu_items,a,x+(a mod 4)*30+h,y+floor(a/4)*30+z);} else if a>0 and a<4 {draw_sprite(menu_items,a,x+(a mod 4)*30+h,y+floor(a/4)*30+z);} pen_color = c_black //draw_sprite(select,-1,x+(global.weapon mod 4)*30+20,y+floor(global.weapon/4)*30)
//if inventory[global.weapon] = 1{ draw_sprite(itemnames,global.weapon,view_xview[0]+209,view_yview[0]-66) draw_sprite(menu_items,global.weapon,view_xview[0]+230,view_yview[0]+45)
} }
else{
}
var box_x, box_y; box_x = view_xview +230 box_y = view_yview + view_hview - 230 draw_sprite(itembox, 0, box_x, box_y) //if objmenu.inventory[global.weapon] = 1 draw_sprite(menu_items,global.weapon,view_xview + 235,view_yview + view_hview - 225) to make a second selectable item?
First of all, only put spoilers between spoiler tags. There is no use for code to be put between spoiler tags. Not to mention that spoiler tags disable all other tags. Okay, now what is your problem. It is hard to decipher. You are talking about a second item to use and to draw the menu. I have no clue what you want to do with the code, but it looks like you are trying to draw menu stuff. But your problem is not clear at all.
Logged
|