Game Maker Studio: How to Collect, Cycle, & Use you're Items?
Visit my MC GAMES site: https://mcolverdesigns.itch.io
Paypal Donate: https://bit.ly/30e8VDZ
GMS File: https://bit.ly/31PeYi8
Forgot to show this in video, Code File: https://bit.ly/3iQ3aTZ
Game Maker Weapon Select Link: https://bit.ly/30Xnw7B
o_global, Depth -500
Event:
Create
Actions:
global.selected=0
global.ammoArrow=0
global.ammoBomb=0
global.ammoDynamite=0
o_draw, Depth -500
Events:
Draw
Actions:
draw_set_color(c_white)
draw_set_font(font0)
if global.selected=0{
draw_text(view_xview[0]+300,view_yview[0]+70, string(global.ammoArrow) )
draw_sprite(s_arrow_box,image_index,view_xview[0]+300,view_yview[0]+20)
}
else if global.selected=1{
draw_sprite(s_bomb_box,image_index,view_xview[0]+300,view_yview[0]+20)
draw_text(view_xview[0]+300,view_yview[0]+70, string(global.ammoBomb) )
}
else if global.selected=2{
draw_sprite(s_dynamite_box,image_index,view_xview[0]+300,view_yview[0]+20)
draw_text(view_xview[0]+300,view_yview[0]+70, string(global.ammoDynamite) )
}
o_bomb_left, applies for bomb, and dynamite
Events:
Create
Actions:
m_gravity = 1
Events:
Begin Step
Actions:
vspeed += m_gravity;
Applies for the Dynamite Spin
Events:
Create
Actions:
angle=180+60
//Rotate the sprite
image_angle=angle
Events:
Step
Actions:
if mouse_check_button_released(mb_none) angle+=20 ///computer will rotate box.
image_angle=angle