Help with creating rooms for a Rougelike
id: 750997
category: Help with Scripts
posts: 5
Mar 29, 2024 16:49:26
Help with creating rooms for a Rougelike
view on scratch
view on legacy ocular
VirusGaming2010
loading
I have been trying to figure out how to make a set of boxes always create next to each box, but sometimes when it goes offscreen it can't check for if a box is there or not. So there is a chance that it will go diagonal or completely away from the rest of the group. Can someone help me find the solution?
Project: https://scratch.mit.edu/projects/991962671/
Project: https://scratch.mit.edu/projects/991962671/
Mar 29, 2024 17:45:22
Help with creating rooms for a Rougelike
view on scratch
view on legacy ocular
ProfessorUelf
loading
Have you tried using a grid system with a list? Or assigning some kind of coordinates to the rooms? I think it could simplify the issue a lot.
Mar 29, 2024 17:52:49
Help with creating rooms for a Rougelike
view on scratch
view on legacy ocular
RokCoder
loading
Without wanting to change your code too much, you could adjust it so it scales the size down while creating the map.
Add a size change to the beginning of Setup Rooms
And modify the positioning during Setup Rooms
And reset the size at the beginning of MOVE CAMERA
If you want to see the map creation at the smaller size, detach the script from the MOVE CAMERA receiver before hitting the green flag.
Add a size change to the beginning of Setup Rooms
define Setup Rooms
set size to (25) %
...
And modify the positioning during Setup Rooms
...
change x by (([sin v] of (direction)) * ((62) * (0.25)))
change y by (([cos v] of (direction)) * ((62) * (0.25)))
...
And reset the size at the beginning of MOVE CAMERA
when I receive [MOVE CAMERA v]
set size to (100) %
...
If you want to see the map creation at the smaller size, detach the script from the MOVE CAMERA receiver before hitting the green flag.
Mar 29, 2024 18:41:28
Help with creating rooms for a Rougelike
view on scratch
view on legacy ocular
VirusGaming2010
loading
Thanks!
Mar 29, 2024 18:48:05
Help with creating rooms for a Rougelike
view on scratch
view on legacy ocular
VirusGaming2010
loading
Without wanting to change your code too much, you could adjust it so it scales the size down while creating the map.
Add a size change to the beginning of Setup Roomsdefine Setup Rooms
set size to (25) %
...
And modify the positioning during Setup Rooms...
change x by (([sin v] of (direction)) * ((62) * (0.25)))
change y by (([cos v] of (direction)) * ((62) * (0.25)))
...
And reset the size at the beginning of MOVE CAMERAwhen I receive [MOVE CAMERA v]
set size to (100) %
...
If you want to see the map creation at the smaller size, detach the script from the MOVE CAMERA receiver before hitting the green flag.
I varied the size to 8% for larger maps. THANKS SO MUCH FOR THE HELP!