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!

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

Skript Skript Tutorial Videos.

Discussion in 'Tutorials' started by Farid, Jun 22, 2017.

  1. Farid

    Farid Active Member

    Joined:
    Feb 5, 2017
    Messages:
    179
    Likes Received:
    11
    So I am starting a new youtube channel with skript tutorials on it, I will be active and mostly uploading everyday, its summer for me, and I have nothing to do at the moment.

    First video:



    Q: Why are you making tutorials, there's bunch of videos out there.
    A: Because the people who make the tutorials are not always active and stop. My summer just started and I'm basically a basement dweller, so why not help other people out.

    Q: Will your channel be just for tutorials only?
    A: No, I will be uploading scripting time-lapse, and such.

    I'm not a huge fan of intros, and outro so I didn't include them.

    Everyone be sure to give me suggestions on what I should improve on next video.

    @BaeFell - Would like to hear your criticism of what I should improve, and what not.
     
  2. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,181
    Likes Received:
    219
    "Writing a code and executing it to a skript file" uh what lol
     
  3. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,181
    Likes Received:
    219
    lol I was tired this was mid night.
     
  4. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,181
    Likes Received:
    219
    Watched through it all and here are the things that need improvement (because I'm a pessimist):
    1) Skript supports 1 space (I think), 2 spaces, 4 spaces and tabs for indentation.
    2) You don't need to specify "to sender" or "to player" after the send effect. The effect assumes who to send it to.

    What I like:
    1) The comments saying what each line is seems really good.
    2) Your use of showing it in-game and loading the script.
    3) Good overview of commands
    4) Fairly decent explanation of Skript usage
     
    • Informative Informative x 1
  5. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,181
    Likes Received:
    219
    I didn't watch it yet but as long as you don't spare bad practices it's good for me. These bad practices are:
    • The use of single variables (the ones separated with a dot) instead of list variables (the ones separated with double colons).
    • Having variables without a prefix per script and not use non-descriptive variable names.
    • Repeat code where you could use loops.
    • The use of bad/known to be buggy features such as skQuery's format slot or Umbaska's freeze state.
    • The use of old/unsupported addons or Skript itself (let's move from the 2.1.2).
    • Code that isn't self-explanatory. For example this is a function by Pikachu:
    Code (Skript):
    1. function rpSound(s: string, p:, c: string, players, v: number = 1, pi: number = 63):
    2.   set {_p} to new play_server_named_sound_effect packet
    3.   set string pinfo 0 of {_p} to {_s}
    4.   set "SoundCategory" penum 0 of {_p} to {_c}
    5.   set float pnum 0 of {_p} to {_v}
    6.   set int pnum 3 of {_p} to {_pi}
    7.   loop {_p::*}:
    8.     set int pnum 0 of {_p} to loop-value's x-loc * 8
    9.     set int pnum 1 of {_p} to loop-value's y-loc * 8
    10.     set int pnum 2 of {_p} to loop-value's z-loc * 8
    11.     send loop-value packet {_p}
    You wouldn't understand at all what it does or how it works at the first time you see it right? Here is my version of that function.
    Code (Skript):
    1. #Sends the specified sound to the specified players in the function via packets
    2. #Parameters:
    3. #{_sound} is the sound that'll be sent (need to be the minecraft sound names, can be a custom one from a resource pack). Here is a list of available sounds https://www.reddit.com/r/Onnowhere/comments/66kj9l/list_of_new_112_sounds/
    4. #{_listeners::*} are the players that will listen the sound.
    5. #{_category} is the category the sound will be heard from.
    6. #{_volume} is the volume of the sound.
    7. #{_pitch} is the pitch of the sound.
    8. #More info about sounds at:
    9. #http://minecraft.gamepedia.com/Commands#playsound
    10. #Examples:
    11. #resourcePackSound("mob.pig.say", player)
    12. #resourcePackSound("mob.pig.say", player, "VOICE", 1, 0.1)
    13. function resourcePackSound(sound: text, listeners: players, category: text = "MASTER", volume: number = 1, pitch: number = 63):
    14.    
    15.     set {_packet} to new play_server_named_sound_effect packet
    16.     set string pinfo 0 of {_packet} to {_sound}
    17.     set "SoundCategory" penum 0 of {_packet} to {_category}
    18.     set float pnum 0 of {_packet} to {_volume}
    19.     set int pnum 3 of {_packet} to {_pitch}
    20.    
    21.     loop {_listeners::*}:
    22.        
    23.         #These are the location where the sound will be heard from, they are multiplied by 8 for a reason that I don't really know but it's needed.
    24.         set int pnum 0 of {_packet} to loop-value's x-coordinate * 8
    25.         set int pnum 1 of {_packet} to loop-value's y-coordinate * 8
    26.         set int pnum 2 of {_packet} to loop-value's z-coordinate * 8
    27.        
    28.         send packet {_packet} to loop-player
    Well, my version of it is way explained but you get the point. Proper spacing and names for whatever you use let's you have an organized and understandable code.
     
  6. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,181
    Likes Received:
    219
    The video contains none of those bad practices as it doesn't go anywhere past basic stuff.
     
  7. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,181
    Likes Received:
    219
    Yeah, it was just in case he does it on this or a next video, it's good if he didn't.
     
  8. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,181
    Likes Received:
    219
    I try my best to let my viewer understand the code line, and yeah that's for giving me a few tips.
     
  9. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,181
    Likes Received:
    219
    Skript actually isn't picky about indents, you can use pretty much any amount of tabs or spaces as long as you don't mix the two and they are consistent within the current trigger
     
  10. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,181
    Likes Received:
    219
    Watching you right now bro, cheers.
    #SupremeNation <3 XD
     
    • Like Like x 1
  11. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,181
    Likes Received:
    219
    Let me know if you guys want an episode 2.
     
    • Ducky Ducky x 1

Share This Page

Loading...