1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

TNT Origin

Discussion in 'Skript' started by Zabrid, Feb 7, 2021.

Thread Status:
Not open for further replies.
  1. Zabrid

    Supporter

    Joined:
    Mar 2, 2019
    Messages:
    52
    Likes Received:
    1
    I need to figure out the origin of an entity in a explosion event. get.origin() does not work in 2.2-dev36 (1.8) any replies would be greatly apricated
     
  2. TehCheetah

    TehCheetah Member

    Joined:
    Feb 7, 2021
    Messages:
    49
    Likes Received:
    1
    Please provide your code using the CODE Tags so I could possibly help you.

    If you don't know where the code tags are, at the top of where you post, there is a box with a + sign. (Looks like [+] <--)
     
  3. Zabrid

    Supporter

    Joined:
    Mar 2, 2019
    Messages:
    52
    Likes Received:
    1
    I've tried 2 ways of getting this information, both do not work:
    Code (Text):
    1. on explosion prime:
    2.     set {_tnt} to entity
    3.     set {_tntOrigin} to location of {_tnt}
    4.     wait 80 ticks
    5.     set {_tntLoc} to location of {_tnt}
    6.     broadcast "%{_tntLoc}%"
    7.     broadcast "%{_tntOrigin}%"
    and
    Code (Text):
    1. on explosion:
    2.     set {_tnt} to entity
    3.     set {_tntLoc} to location of {_tnt}
    4.     set {_tntOrigin} to {_tnt}.getOrigin()
    5.     broadcast "%{_tntLoc}%"
    6.     broadcast "%{_tntOrigin}%"
    Both do not work, the first one doesn't work at on explosion prime doesn't work on 1.8.9, it only goes off whenever the TNT actually blows up not when its first primed. The second one does not work as .getOrigin() does not work/exist for 1.8.9

    I have skript-mirror

    I even tried using bukkit's on prime event aswell, has the same effect as the skript one,
     
    #3 Zabrid, Feb 9, 2021
    Last edited: Feb 9, 2021
Thread Status:
Not open for further replies.

Share This Page

Loading...