Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Rooms Game - Entity Spawning Scripts Help NEEDED!
- Dawnbreaker_1
-
Scratcher
18 posts
Rooms Game - Entity Spawning Scripts Help NEEDED!
So I am currently making a rooms-spin-off game and I don't know how to make the scripts that spawn the entities. I need it to work like this:
1. Check what entities can spawn at the room number
2. Randomly Choose if the entity will spawn
3. Spawn the entity.
4. The entity attacks then despawns.
Here is the link to the project:
https://scratch.mit.edu/projects/1366680381/
1. Check what entities can spawn at the room number
2. Randomly Choose if the entity will spawn
3. Spawn the entity.
4. The entity attacks then despawns.
Here is the link to the project:
https://scratch.mit.edu/projects/1366680381/
- cool_username_right
-
Scratcher
100+ posts
Rooms Game - Entity Spawning Scripts Help NEEDED!
would something like this work?
if <(can spawn) = [true]> then
set [spawn true v] to (pick random (1) to (5))
if <(spawn true) = [1]> then
create clone of [myself v]
end
end
- cool_username_right
-
Scratcher
100+ posts
Rooms Game - Entity Spawning Scripts Help NEEDED!
you'll probably need to add a (wait _ seconds) or (wait until_) block
Last edited by cool_username_right (Today 03:04:10)
- cool_username_right
-
Scratcher
100+ posts
Rooms Game - Entity Spawning Scripts Help NEEDED!
if <(can spawn) = [true]> then
set [spawn true v] to (pick random (1) to (5))
if <(spawn true) = [1]> then
create clone of [myself v]
else
wait (2) secs
end
end
Last edited by cool_username_right (Today 03:06:47)
- Dawnbreaker_1
-
Scratcher
18 posts
Rooms Game - Entity Spawning Scripts Help NEEDED!
it worked thx bro
- Discussion Forums
- » Help with Scripts
-
» Rooms Game - Entity Spawning Scripts Help NEEDED!