Hologram not being Bright

  • 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 community!

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

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

LoneElf

Active Member
Apr 30, 2017
165
2
18
Ok. I have an issue - For halloween, I made it so that when you spawn a pumpkin, it creates a hologram. That is working fine and all, except for 1 thing: When I place it, it spawns a hologram like it should, but it is dark, just as if it is spawned in the block, not above it. When I remove the block, it gets clear again, and bright like normal.

Code:
code_language.skript:
every 2 seconds:
        loop all players:
                loop blocks in radius 30 around the loop-player:
                        if loop-block is pumpkin:
                                create hologram "{@pumpkintext}" at block 1 meter above loop-block for 2 seconds


Thanks guys!

Best of Luck,
- @LoneElf
 
Ok. I have an issue - For halloween, I made it so that when you spawn a pumpkin, it creates a hologram. That is working fine and all, except for 1 thing: When I place it, it spawns a hologram like it should, but it is dark, just as if it is spawned in the block, not above it. When I remove the block, it gets clear again, and bright like normal.

Code:
code_language.skript:
every 2 seconds:
        loop all players:
                loop blocks in radius 30 around the loop-player:
                        if loop-block is pumpkin:
                                create hologram "{@pumpkintext}" at block 1 meter above loop-block for 2 seconds


Thanks guys!

Best of Luck,
- @LoneElf
You shouldn't use that script, you're gonna get a ton of lag. I would tell you how to improve it, but I don't help
 
It doesn't lag for me.

Thanks for those who are willing to help!

Thanks,
- @LoneElf
Well it will lag if you have a lot of players online. Just use on place of pumpkin event and while loop the block to spawn a hologram until the block is broken.
 
I understand. The thing is, how would I check if it is not destroyed? If I know how to do that, I will be able to make it less laggy

Thanks,
- @LoneElf
 
I understand. The thing is, how would I check if it is not destroyed? If I know how to do that, I will be able to make it less laggy

Thanks,
- @LoneElf
Check location at the pumpkin that was placed. If the location is still the pumpkin block, continue while loop.
 
Ok. I have an issue - For halloween, I made it so that when you spawn a pumpkin, it creates a hologram. That is working fine and all, except for 1 thing: When I place it, it spawns a hologram like it should, but it is dark, just as if it is spawned in the block, not above it. When I remove the block, it gets clear again, and bright like normal.

Code:
code_language.skript:
every 2 seconds:
        loop all players:
                loop blocks in radius 30 around the loop-player:
                        if loop-block is pumpkin:
                                create hologram "{@pumpkintext}" at block 1 meter above loop-block for 2 seconds


Thanks guys!

Best of Luck,
- @LoneElf
So lets say you have a respectable 20 players online. In a sphere with a radius of 30 there are 113,104 blocks (air counts). Every 2 seconds, you loop all 20 players. 20 * 113,104 is 2,262,080 blocks looped every 2 seconds, and skript isn't the fastest at looping in the first place.
[doublepost=1506734857,1506734587][/doublepost]To be precise, that's 1.25 seconds or so worth of lag every 2 seconds on my test machine.
upload_2017-9-29_20-27-38.png
 
Sick, @Pikachu.

Ok. So, @White, this is what I have so far:
code_language.skript:
on block place:
        if event-block is a 86:
                set {_pumpkinLoc} to location of event-block
                while {_pumpkinLoc} is
                        create hologram "{@pumpkintext}" at block 1 meter above loop-block for 2 seconds

Not quite sure how to finish it :emoji_stuck_out_tongue:

Thanks,
- @LoneElf
 
Sick, @Pikachu.

Ok. So, @White, this is what I have so far:
code_language.skript:
on block place:
        if event-block is a 86:
                set {_pumpkinLoc} to location of event-block
                while {_pumpkinLoc} is
                        create hologram "{@pumpkintext}" at block 1 meter above loop-block for 2 seconds

Not quite sure how to finish it :emoji_stuck_out_tongue:

Thanks,
- @LoneElf
There is no need to use the while loop here, all it does is crash your server because you haven't put any waits. You should be attatching a metadata value to block with the id of the hologram/uuid of the armor stand and on break delete that hologram or armor stand from the metadata.
 
Or, like I am going to add now, I am going to add a 'wait 5 ticks'

Thanks,
- @LoneElf

Edit - And I will change the 2 seconds to 5 ticks
 
Status
Not open for further replies.