Discord Thread can someone help me? i

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

This thread came from the skUnity Discord. You can't reply to it here but if you join the skUnity Discord, you'll be able to post a reply there. The thread link is part of the thread's message.
Status
Not open for further replies.
heres the skript
code_language.skript:
on right click:
  player's tool's name contains "Terminator"
  #run the function
function termbeam(p: player, length: number, dmg: number):
    set {_x} to 0
    set {_l} to 0
    loop {_length} times:   #loops as many times as long as the length from the function input
        add 1 to {_x}
        add 0.25 to {_l}
        set {_rg%{_x}%} to location {_l} meters infront of {_p}
        set {_rg%{_x}%} to location 1.18 meters above {_rg%{_x}%} #aligns with where player is looking better
    # all of the locations are saved as soon as the function is called, effects such as particles can be applied afterwards.
    set {_x} to 0
    loop {_length} times:
        add 1 to {_x}
        draw 1 dripping_lava at {_rg%{_x}%} #change color or particle type
        loop entities in radius 1 around {_rg%{_x}%}:
            loop-entity is not {_p}
            damage loop-entity by {_dmg}
        loop blocks in radius 0.5 around {_rg%{_x}%}:
            if loop-block is not tall grass, short grass, snow layer, air or water:
                stop #projectile does not go through blocks, but passes through expected blocks 
on damage:
    attacker is player
    attacker's tool's name contains "Terminator"
    set {hits::%victim's uuid%::%attacker's uuid%} to {hits::%victim's uuid%::%attacker's uuid%} + 1
    {hits::%victim's uuid%::%attacker's uuid%} = 3
    clear {hits::%victim's uuid%::%attacker's uuid%}
    {termbeam.%attacker's uuid%} isn't set
    set {termbeam.%attacker's uuid%} to 1
    termbeam(attacker, 50, 70)
    wait 0.5 second
    clear {termbeam.%attacker's uuid%}

Posted by: 4icyy from the skUnity Discord.
 
Status
Not open for further replies.