Throwing TNT

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

Hykz

Member
May 8, 2017
28
3
3
30
Canada
Category: fun??

Suggested name: ThrowTNT

What I want:
when you click with a tnt block in your hand it will throw it in the direction you're looking about 2 blocks ahead of you and explode 1.5 seconds after you throw it

Ideas for commands: nun

Ideas for permissions: nun

When I'd like it by: anytime soon would be noice
[doublepost=1514433802,1514273697][/doublepost]Solved it myself

if anyone is wondering what i did: (requiers skellett)

on click:
if player's tool is a TNT:
cancel event
remove 1 TNT from player's inventory
spawn 1 primed TNT at location of block above player
set fuse time of the last spawned primed TNT to 30
wait 1 tick
push last spawned tnt in direction of player with force 0.4