This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2013-02-22 05:35:30

Bombguy2010
New Scratcher
Registered: 2013-02-08
Posts: 17

pause game

How can i make something that can pause and resume my game?

Offline

 

#2 2013-02-22 08:42:15

Sqervay
New Scratcher
Registered: 2012-10-28
Posts: 52

Re: pause game

1. Make a pause button:

when gf clicked
forever
  if < <mouse down?> and <touching [mouse-pointer v]> >
  set [pause? v] to (true)
  wait until < <mouse down?> and <touching [mouse-pointer v]> >
  set [pause? v] to (false)
end
2. After that put the script below in the forever loop you want to pause of the sprite you want to pause:

if < (pause?) = [true] >
  repeat until < (pause?) = [false] >
  
  end
end
Hope it helps  smile

Offline

 

#3 2013-02-22 08:49:55

ErnieParke
Scratcher
Registered: 2010-12-03
Posts: 1000+

Re: pause game

Sqervay wrote:

1. Make a pause button:

when gf clicked
forever
  if < <mouse down?> and <touching [mouse-pointer v]?> >
  set [pause? v] to (true)
  wait until < <mouse down?> and <touching [mouse-pointer v]?> >
  set [pause? v] to (false)
end
2. After that put the script below in the forever loop you want to pause of the sprite you want to pause:

if < (pause?) = [true] >
  repeat until < (pause?) = [false] >
  end
end
Hope it helps  smile

Fixed.


http://i46.tinypic.com/35ismmc.png

Offline

 

Board footer