1

Help me!

Need_Not's Avatar Need_Not2/2/19 4:03 pm
1 emeralds 270 5
2/5/2019 10:53 am
Need_Not's Avatar Need_Not
So I just bought cubik studio and the first thing i am making is a paintball resource pack like a gun and mask but after i had made the gun i realized that it will just shoot a gun not a snowball now i am making a map so is it possible to use some thing else and it will summon a snowball? because i rlly want this to work.

-THX Need_Not
Posted by Need_Not's Avatar
Need_Not
Level 38 : Artisan Artist
6

Create an account or sign in to comment.

5

1
02/02/2019 5:58 pm
Level 52 : Grandmaster Blob
HoboMaggot
HoboMaggot's Avatar
You will need to use raycasting and a right click detector (unless your gun is a retextured carrot on a stick) which would summon a snowball relative to where you are facing. Unfortunately, you have to be good with commands.
1
02/04/2019 11:25 am
Level 38 : Artisan Artist
Need_Not
Need_Not's Avatar
ok but do you happen to know the command? if not ill find it
1
02/05/2019 1:50 am
Level 52 : Grandmaster Blob
HoboMaggot
HoboMaggot's Avatar
A complete raycasting function, just need to fill in the gaps for your specific use
execute as <shooter> at @s anchored eyes positioned ^ ^ ^ anchored feet run function start_ray
# start_ray.mcfunction
tag @s add ray
scoreboard players set #hit temp 0
scoreboard players set #distance temp 0
function ray
tag @s remove ray

# ray.mcfunction
execute unless block ~ ~ ~ #trace_through run function hit_block
execute if score #hit temp matches 0 positioned ~-0.05 ~-0.05 ~-0.05 as @e[tag=!ray,dx=0,sort=nearest] if score #hit temp matches 0 positioned ~-0.85 ~-0.85 ~-0.85 if entity @s[dx=0] run function hit_entity
scoreboard players add #distance temp 1
execute if score #hit temp matches 0 if score #distance temp matches ..<max distance> positioned ^ ^ ^0.1 run function ray

# hit_entity.mcfunction
scoreboard players set #hit temp 1
<your commands for when an entity is hit>

# hit_block.mcfunction
scoreboard players set #hit temp 1
<your commands for when a block is hit>
(edited)👍12
Just fixed it running for multiple entities in the ray. Technically it doesn't actually get the closest to the actual hit point, but it is pretty close
1
02/05/2019 1:51 am
Level 52 : Grandmaster Blob
HoboMaggot
HoboMaggot's Avatar
btw This was what someone else sent in a command blocking discord (dont know if he is in planet mc)
1
02/05/2019 10:53 am
Level 38 : Artisan Artist
Need_Not
Need_Not's Avatar
so i would have to manuly add everyone's name?
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome