Loop Blocks Around

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

ShaneBee

Supporter +
Addon Developer
Sep 7, 2017
2,248
241
73
Vancouver, Canada
Category:

Suggested name: *TBD*

What I want:
I am working on making a skript for a space style system, which would include another planet for my players to visit. I am stuck on one part in particular.
So for example, when my players get to space, I want them to be able to build a little "space station" and have an air system inside.
The idea would be simple, you would build say a 10x10 room, maybe 3 blocks high.... and in the room place your air machine (not sure what this will be yet, maybe a dispenser with glass on top, and a button on the side) so what I would like to see, is when the player clicks the button, it would start the air machine (that I will set up myself) the part I need help with is determining the amount of air in the room. I have an idea that a 10x10x3 room would = 300 air blocks, and for every 300 air blocks, they get 60 minutes of air in the room. Smaller room = more time, bigger room = less time.
Is there a way I can set it so once they "turn on" the machine it will loop a radius of air blocks around the machine? Maybe have it pop up on a scoreboard or even a boss bar. I am just stuck on the part looping the air blocks WITHIN the room.
I am confident I can write everything else in regards to getting to space, space ores etc... just this room, my brain is stuck on how I would loop JUST the air blocks around the machine, and not outside of the walls of the room.
Thanks :emoji_grinning:


Ideas for commands: Not necessary

Ideas for permissions: Not necessary

When I'd like it by: Anytime really. The sooner the better, but I am really in no rush.
 
It would be easier to make something like a bubble, you can look for the distance between the nearest air machine and the player.
The radius could be set with the amount of fuel or what ever there is inside the air machine. And you can make the fuel disappear after some time.
More fuel = bigger radius; Less fuel = smaller radius; That would be easier to write. You also can make the player see the radius of the air see as blue glass or a block of your choice. I know its not that realistic, but i think that would be an easier solution.
 
Category:

Suggested name: *TBD*

What I want:
I am working on making a skript for a space style system, which would include another planet for my players to visit. I am stuck on one part in particular.
So for example, when my players get to space, I want them to be able to build a little "space station" and have an air system inside.
The idea would be simple, you would build say a 10x10 room, maybe 3 blocks high.... and in the room place your air machine (not sure what this will be yet, maybe a dispenser with glass on top, and a button on the side) so what I would like to see, is when the player clicks the button, it would start the air machine (that I will set up myself) the part I need help with is determining the amount of air in the room. I have an idea that a 10x10x3 room would = 300 air blocks, and for every 300 air blocks, they get 60 minutes of air in the room. Smaller room = more time, bigger room = less time.
Is there a way I can set it so once they "turn on" the machine it will loop a radius of air blocks around the machine? Maybe have it pop up on a scoreboard or even a boss bar. I am just stuck on the part looping the air blocks WITHIN the room.
I am confident I can write everything else in regards to getting to space, space ores etc... just this room, my brain is stuck on how I would loop JUST the air blocks around the machine, and not outside of the walls of the room.
Thanks :emoji_grinning:


Ideas for commands: Not necessary

Ideas for permissions: Not necessary

When I'd like it by: Anytime really. The sooner the better, but I am really in no rush.

https://forums.skunity.com/threads/3-skript-challenge-area-fill-winners-announced.2412/

If you modify one of the entries to this it might be able to do what you are describing. You'll want to limit the amount of blocks it loops though incase it isn't a closed off room