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

#1 2012-08-21 19:12:09

Zparx
Scratcher
Registered: 2011-03-23
Posts: 500+

Object Changing Positions in Scrolling Game?

I want to make an object assume an initial position on the level of the game, then be able to change positions but still scroll, of course. For example, the character walks up to the object, picks it up, walks over some more, and drops the object. How would I make it scroll from the new position? Thanks in advance!


- Zparx


http://images3.wikia.nocookie.net/__cb20101119183412/halo/images/4/43/Hero2.png
^ My rank on Halo: Reach :3

Offline

 

#2 2012-08-21 19:19:56

Prestige
Scratcher
Registered: 2008-12-15
Posts: 100+

Re: Object Changing Positions in Scrolling Game?

For while the player has it, forget scroll variables and have it go to the player. When its dropped, record the scrollX variable value and have it fall until it hits ground, then use the recorded scrollX as its new position.


"Don't insult someone until you've walked a mile in their shoes. That way, if they don't like what you have to say, you'll be a mile away and still have their shoes  smile  "

Offline

 

#3 2012-08-21 19:30:04

Zparx
Scratcher
Registered: 2011-03-23
Posts: 500+

Re: Object Changing Positions in Scrolling Game?

Prestige wrote:

For while the player has it, forget scroll variables and have it go to the player. When its dropped, record the scrollX variable value and have it fall until it hits ground, then use the recorded scrollX as its new position.

YOU'RE RIGHT! I knew it was on the tip of my tongue. Haha, thank you!


http://images3.wikia.nocookie.net/__cb20101119183412/halo/images/4/43/Hero2.png
^ My rank on Halo: Reach :3

Offline

 

#4 2012-11-22 15:57:53

SuperGuys
Scratcher
Registered: 2012-02-25
Posts: 11

Re: Object Changing Positions in Scrolling Game?

What if it is X and Y scrolling?


http://i49.tinypic.com/i3t6ht.gif  The Demo! Click the link to try it!

Offline

 

#5 2012-11-22 18:33:20

bob6
Scratcher
Registered: 2010-07-01
Posts: 100+

Re: Object Changing Positions in Scrolling Game?

SuperGuys wrote:

What if it is X and Y scrolling?

next time make a new post.


For both X and
Y scrolling, it is essentially the same. If the player picks it up, ignore X and Y scrolling, and when the player puts it down, record the X and Y positions as the new position fo the object.


http://i46.tinypic.com/3148ksz.gif

Offline

 

Board footer