Jump to content

How to do a randomizer?


Recommended Posts

on walk on cobblestone:
    chance of 5%:
        loop blocks in radius 5 around player:
            if loop-block is air:
                if block above loop-block is air:
                    add loop-block's location to {_locs::*}
                    set {_loc} to random element of {_locs::*}
                    spawn a zombie at {_loc}

image.png.6b83388bece6fb7d874e120f33c8dd96.png


IGN¬†‚ě£¬†Pickey¬†( Soon )¬†
Joined MineHut ‚ě£ January 7th 2019
Joined Forums¬†‚ě£ January 11th 2021
 
Admin on NotedGens
Manager on NotedGens
Developer on Cropied
Developer on Gennow (Genable)

==========================================
Best Job: Badlion ( Client Moderator [ Failed Trial / Demoted] )
Retired From: InvadedLands ( Moderator )
Retired From:  MineTime ( Sr.Moderator )
Retired From: Hero Mines ( Helper )
Link to comment
Share on other sites

56 minutes ago, Chloe30k said:

on walk on cobblestone:
    chance of 5%:
        loop blocks in radius 5 around player:
            if loop-block is air:
                if block above loop-block is air:
                    add loop-block's location to {_locs::*}
                    set {_loc} to random element of {_locs::*}
                    spawn a zombie at {_loc}

I tried doing 

on walk on block

but it don't work

i want my script to work on all blocks not just one, any ideas?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
√ó
√ó
  • Create New...