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

#1 2012-12-29 07:07:00

iCode12
New Scratcher
Registered: 2012-12-27
Posts: 1

Setting the Variable

I've just discovered scratch and I'm having the most fun programming with it. I'm doing a basic Mario game and it's coming along pretty well. When the game ends, Mario returns to the start position, however I would like him to stop at his current position. So I created a variable called current position, but I don't know what to set that variable to.

Can someone please help me?

Cheers  smile

Offline

 

#2 2012-12-29 13:36:32

30-1
Scratcher
Registered: 2012-08-08
Posts: 100+

Re: Setting the Variable

set [current x v] to (x position)
set [current y v] to (y position)
then:
go to x: (current x) y: (current y)

Last edited by 30-1 (2012-12-29 13:37:38)


http://i.imgur.com/ocOya7x.gif
I. Text I Based I Games I

Offline

 

Board footer