Ranged Attacks

  • 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.

eChris

Member
Mar 8, 2017
7
0
0
Hi, I'm trying to make Mages shoot ranged shots that only travel for 3 blocks.

Currently I'm using this to shoot stuff:

Code:
on shoot:
    projectile is arrow:
        if shooter is holding a hoe:
            while ground state of projectile is false:
                play green spark at projectile
                wait 1 tick
                push projectile upwards at speed 0.04
on leftclick:
    if player is holding a hoe:
        if {mana.%uuid of player%} is greater than 5:
            show 50 green spark at the player
            make the player shoot an arrow at speed 1
            set {mana.%uuid of player%} to {mana.%uuid of player%} - 5
            loop players in radius 32 of player:
                play sound "ENTITY_ENDERDRAGON_SHOOT" to loop-player with volume 5 and pitch 10

How can I make it so that the projectile is invisible, and disappears after 3 blocks?
 
Status
Not open for further replies.