Game Maker Studio: How to Gain 50 Coins, then Restart Game? VIDEO
GMS File: https://rb.gy/f5yeoy
obj_coin
Events:
Left Pressed
Actions,
Destroy instance, other ///Do not set to self you will delete other coins.
Set variable global.score1 to 5 points ///Each coin gives you 5 points, could change to 1 point.
If global.score1 is not greater than 50 ///This is saying after you collect 50 coins, the very next coin you pick up it will restart. You could say equal to coin, meaning once you collect 45 coins, the next coin you pickup you will restart, but you will not see the number 50 points, it will restart right away. Too fast to see the change. Tryed timer, but did not seem to delay the restart process to see number 50 points.
Start of a block
Stop sound newsdplay
Restart the game
End of block
sdobject, this is the sound audio object
Events
Create
Actions:
Play sound newsdplay, Loop true
Other Videos By MC Designs 2021-04-16 Game Maker 8.1: How to Warp from one Area to another Area? 2021-04-16 Game Maker Studio: How to Collect Rewards, once you past Certain Amount of Time? 2021-04-10 Game Maker Studio: (Part1) How to Collect Coins to Buy a Item? 2021-04-10 Game Maker Studio: How to Warp & Destroy at Position? 2021-04-03 Game Maker 8.1: How to Find a Map, & Make Visible on Screen? 2021-03-27 Game Maker Studio: (Part 2) How to Save, & Load you're Inventory? 2021-03-21 Game Maker Studio: (Part 1) How to Save, Load You're Room, & Mark Inventory Persistent? 2021-03-20 Game Maker Studio: How to Move, Parenting, & Void Getting Stuck in Walls? 2021-03-13 Game Maker Studio: (Part 2) Randomly Choosing Set of Numbers & Images? 2021-03-13 Game Maker Studio: (Part 1) How to Gain, Take Away, & Move to Next Room? 2021-03-07 Game Maker Studio: How to Gain 50 Coins, then Restart Game? 2021-03-06 Game Maker Studio: How to Save & Load Coins you Pick Up, Room, & Score? 2021-02-27 Game Maker 8.1: How to Create a Mini Map, & find Enemies & Items? 2021-02-20 Game Maker Studio: How to Create Googly Eyes, when Getting Hit? 2021-02-16 Game Maker Studio: How to Create a Easy Inventory System for Android? 2021-02-13 Game Maker Studio: How to Create a Easy Inventory System for PC? 2021-02-12 Game Maker Studio: How to Angle Shake an Object, when getting Hit? 2021-02-12 Game Maker 8.1: How to Open a Door, once Equal Number of Prisoners are Saved? 2021-02-12 Game Maker 8.1: How to Scale Buttons, when Pressed? 2021-02-06 Game Maker 8.1: How to Collect Key, Messages, Open Cell, & Save a Prisoner? 2021-01-30 Game Maker Studio: How to Shake an Object, when getting Hit?
Tags: game
maker
studio
device
android
var
variable
global
score
set
destroy
instance
restart
room
go
sound
stop
coin
collect
collection
pick
up
pickup
value
learn
teach
show
how
find
create
mouse
pressed
button
loop
audio
gain
points
point
other
self
windows
computer
pc
obj
object