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

#1 2012-01-16 22:14:15

haloman298
New Scratcher
Registered: 2011-09-03
Posts: 18

What is an efficient way to make enemies in a game reappear...

with the variables scrollx and xpos?  (to have enemies move with scrolling)

This is so the game run more smoothly with recycled sprites.  I plan to have varying environments within the game, so will "go to: x: ... y: ..." be effective enough?  Or should I use "set xpos to: ..." every time one is killed and hidden?
Please give suggestions.
Thanks.

Offline

 

#2 2012-01-17 15:22:19

Kileymeister
Scratcher
Registered: 2008-04-17
Posts: 1000+

Re: What is an efficient way to make enemies in a game reappear...

Every time one is hidden, it would probably be best if you used the "set xpos to: " piece, to have it respawn in a new area.  If you use "go to: " it will go there but then be realigned with its scrolling position.

Last edited by Kileymeister (2012-01-17 15:22:41)


I'm back, and showcasing two new* projects!  Click left or right on the image below to see!
http://img109.imageshack.us/img109/7905/part1l.pnghttp://img859.imageshack.us/img859/6417/part2bf.png

Offline

 

Board footer