Discuss Scratch

cs723789
New Scratcher
12 posts

How to make enemies spawn in different locations of my game

Hi, I'm doing a class assignment for my Tech class again and I'm supposed to create a video-game relating to an educational topic. I'm somewhat basing my game on the incredible “Circle Wars” and I was wondering if I can get some feedback on my game as to the enemy sprite (carbon atom). I want the sprites to spawn at different locations around the core of the star (the white area of the backdrop).

https://scratch.mit.edu/projects/95879717/

This is the link to my game

I hope you can help me with my assignment!
rubyannabelle
Scratcher
4 posts

How to make enemies spawn in different locations of my game

i would like to now to
MClovers
Scratcher
1000+ posts

How to make enemies spawn in different locations of my game

You use a code the x:0 y:0 is where you put where it spawns
whenclickedgotox:0y:0
crisostimo
Scratcher
500+ posts

How to make enemies spawn in different locations of my game

Looks like you have solved it already in your project.

One suggestion: keep a variable that stores a count of the number of clones (change by 1 when a clone is created and by -1 before a clone is deleted). In your forever loop, put an if statement that checks to make sure you don't have too many clones before it creates more. Scratch gets really laggy when there are a lot of clones moving around.

Slightly more advance suggestion: don't use a forever loop in your clones. Stick to just the one forever loop and have it broadcast a message to all the clones to ‘Update position’ and have the movement update code in the handler for that message. You will find this way to be less laggy and will prevent you from future bugs.
cs723789
New Scratcher
12 posts

How to make enemies spawn in different locations of my game

Hi, its me again. I'm sorry for not replying right away like I want to due to school and * like that. Ok, so now I want to make one of the variables to slowly reduce from 100 (kind of like a timer but different) and I soon I'll create a power-up so that the Gravity Countdown Variable can replenish, along with the Helium Atom (if it attacks it or being near it since it'll slow down the process of the star dying out). Also I put that if the Carbon Atom gets into contact with the Core, the Gravity Variable should go down by X amount and nothing is working.

https://scratch.mit.edu/projects/95879717/

Here's the link to my game.

Please get back with me if possible (if I haven't figured it out yet) and thank you guys for helping me with my assignment!

Last edited by cs723789 (Feb. 17, 2016 01:28:28)

Powered by DjangoBB