Help with particle projectile

Started by slow_as_a_sloth on

Topic category: Help with modding (Java Edition)

Last seen on 20:19, 27. Feb 2024
Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Help with particle projectile

So bassically im trying to make a weapon shoot something and I want it to shoot a line out infront that is made of particles, so bassically when i shoot instead of an arrow it shoots out a line of particles instead Is it possible to make in a procedure (with no added projectiles OR ranged weapon)

Last seen on 20:56, 17. May 2024
Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I'm pretty sure you can set…
Sun, 04/09/2023 - 12:29

I'm pretty sure you can set the item representing texture of ranged item to air in ranged item settings, then you can add a procedure for on projectile flying tick which uses the spawn particles procedure block.

Last seen on 20:19, 27. Feb 2024
Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Is there a way to do it…
Sun, 04/09/2023 - 21:00

Is there a way to do it WITHOUT the ranged items?

 

Last seen on 20:56, 17. May 2024
Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Sorry, I read it as without…
Mon, 04/10/2023 - 19:50

Sorry, I read it as without extra ranged items(like you already had one).  You can use the repeat block, local variables, the get look position block, and the for each entity in radius block.  Here is an example procedure for "when item right-clicked":
Create a custom number variable called range, and a custom logic variable called foundtarget, then use the following procedure

Every different procedure block is placed within ( ) and sub-components that you can modify that are not blocks will be listed within [ ]  if a procedure block should not be changed from what I say, it will be marked with * if a line needs to be continued it will end with...

(If(Not(Is provided world client-side)))*
do:(Play[block.beacon.deactivate] at x:(X)y:(Y)z:(Z) Level:(1)pitch:(1.8)Category:[player])

      (Set[local: range] to: (1))*

      (Set[Local: foundtarget] to: (false))*

      (Repeat (40) times)

      do:(for each entity as (Entity iterator) at x:(look X position of (Event/target entity) with raytrace distance (Get[Local: range])...

...fluid mode [NONE] block mode [OUTLINE]) y:(look Y position of (Event/target entity) with raytrace distance (Get[Local: range...

])...fluid mode [NONE] block mode [OUTLINE]) z:(look Z position of (Event/target entity) with raytrace distance (Get[Local: rang...

e])...fluid mode [NONE] block mode [OUTLINE]) in square cube with size (1.5)*

            do:(if((Is (Entity iterator) (sub)type of [Living entity]) AND (not((Event/target entity) = (Entity iterator))))*

                  do:(if((get [local: foundtarget]) = (false)))

                        do:(Play[block.beacon.activate] at  x:(look X position of (Event/target entity) with raytrace distance (Get[Local: ra...

...nge])fluid mode [NONE] block mode [OUTLINE]) y:(look Y position of (Event/target entity) with raytrace distance (Get[Local: r...

ange])...fluid mode [NONE] block mode [OUTLINE]) z:(look Z position of (Event/target entity) with raytrace distance (Get[Local:...

 range])...fluid mode [NONE] block mode [OUTLINE]) Level:(1)pitch:(1.8)Category:[player])

                              (Deal ((10) * ((1) - ((armor value of (Entity iterator)) / (30)))) damage to (entity iterator) type:[generic])

                              (Spawn (30) particles on server-side at x:(look X position of (Event/target entity) with raytrace distance (Get[L...

...ocal: range])fluid mode [NONE] block mode [OUTLINE]) y:(look Y position of (Event/target entity) with raytrace distance (Get[...

Local: range])...fluid mode [NONE] block mode [OUTLINE]) z:(look Z position of (Event/target entity) with raytrace distance (Ge...

t[Local: range])...fluid mode [NONE] block mode [OUTLINE]) in area dx: (1) dy: (1) dz: (1) with speed (0) type:[CRIT])

                              (Set [Local: foundtarget] to (true))

                              (if(not(Is(Get entity (Entity iterator) is targeting for attack) (sub)type of [Living entity])))*

                              do:(Set the attack target of (Entity iterator) to (event/target entity))

            (if((Get [Local: foundtarget]) = (false))

            do:(Spawn (3) particles on server-side at x:(look X position of (Event/target entity) with raytrace distance (Get[Local: ra...

...nge])fluid mode [NONE] block mode [OUTLINE]) y:(look Y position of (Event/target entity) with raytrace distance (Get[Local: r...

ange])...fluid mode [NONE] block mode [OUTLINE]) z:(look Z position of (Event/target entity) with raytrace distance (Get[Local:...

 range])...fluid mode [NONE] block mode [OUTLINE]) in area dx: (0.6) dy: (0.6) dz: (0.6) with speed (0) type:[CRIT])*

            do:(Set [Local: range] to: ((Get [Local: range]) + (1))

      (Cooldown (Provided itemstack) for (30) ticks for (Event/target entity))

      (Deal (1) damage to (Provided itemstack))

 

 

 

 

 

I know that this procedure is complex and messy looking, and it deals no damage and will not cause experience to drop, but this is the best way to do what you are asking for without using a ranged item.  Also, I am sorry, but I am unable to send you a screenshot of the procedure.

 

Also, I have tested this procedure, and it does work for MCreator 2023.1 and Minecraft 1.19.2

Last seen on 20:19, 27. Feb 2024
Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thanks so much!  
Mon, 04/10/2023 - 21:16

Thanks so much!