Solved Cobwebs Launcher

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

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

JustADev

Well-Known Member
Apr 8, 2017
379
9
18
22
Question: How would I make a sword launch cobwebs in the direction that a player is facing if they right click a wooden sword
 
Wait, how do I spawn the actual cobweb so it works?

My code:
code_language.skript:
on rightclick with wood sword:
    name of player's tool is "&eWeb Slinger &7(Right Click)":
        make "M" with cobweb at location of player with effect true
        push last spawned entity upwards in direction of player at speed 5
 
code_language.skript:
set {_loc} to location in front of player's head
spawn falling block of cobweb at {_loc}
# push it
 
But now this doesnt work:
It says can't understand bc you cant push a block via skript
code_language.skript:
on rightclick with wood sword:
    name of player's tool is "&eWeb Slinger &7(Right Click)":
        set {_loc} to location in front of player's head
        spawn falling block of cobweb at {_loc}
        push last spawned block upwards in direction of player at speed 3
 
But now this doesnt work:
It says can't understand bc you cant push a block via skript
code_language.skript:
on rightclick with wood sword:
    name of player's tool is "&eWeb Slinger &7(Right Click)":
        set {_loc} to location in front of player's head
        spawn falling block of cobweb at {_loc}
        push last spawned block upwards in direction of player at speed 3
No that's not why, you didn't spawn a block you spawned an entity
[doublepost=1501724382,1501724335][/doublepost]
code_language.skript:
set {_loc} to location in front of player's head
spawn falling block of cobweb at {_loc}
# push it
In the future just let him check the docs, the dude obviously doesn't do any checking on his own
 
Bro, I did, but it doesnt count the falling cobweb as an entity and says it cant understand. However, when i change the falling block to sand, it works
[doublepost=1501724714,1501724450][/doublepost]So does it need to be:

spawn cobweb at {_loc}?
[doublepost=1501724839][/doublepost]I legit did the exact same thing as you
[doublepost=1501724882][/doublepost]nm it worked
 
Status
Not open for further replies.