Solved Help with cancelling certain event

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

verycoolguy123

Active Member
Jul 31, 2017
70
2
0
So, I've looked through the documentation and I've found nothing which matches something similar to this:
code_language.skript:
On projectile hit:
    cancel teleport
 
maybe you could teleport the player back since the projectile hit event isn't cancellable. like when they throw it set a location var and then on hit tp them back to where they were when they threw it.
 
maybe you could teleport the player back since the projectile hit event isn't cancellable. like when they throw it set a location var and then on hit tp them back to where they were when they threw it.
This doesn't work. What do you think would work?
code_language.skript:
on projectile hit:
    if projectile is enderpearl:
        set {_block} to the block at location of the projectile
        if {_block} is air:
            set {_block} to the block at location 0.5 in front of the projectile
            teleport shooter to {_block}
        else:
            set {_block} to the block at location 0.5 behind the projectile
            teleport shooter to {_block}
[doublepost=1503685407,1503680216][/doublepost]Marking as solved, doing this in java instead. No reason to keep trying to do this in skript.
 
Status
Not open for further replies.