[TUTORIAL]How to make a projectile that is less effected by water(no code)

Started by Catnip on

Topic category: User side tutorials

Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[TUTORIAL]How to make a projectile that is less effected by water(no code)
Fri, 12/01/2023 - 22:24 (edited)

I was experimenting with making a ranged weapon unaffected by water, and I found a procedure that gets close.  This is not perfect but if you use the following procedure on the trigger 'while projectile flying tick' it acts almost like it is in the air:
(If(Is(Immediate Source Entity) in water or bubble column))

Do:  (Attempt to override motion vector of (immediate source entity) to vx: ((X velocity of(immediate source entity)) * (1.6))  vy: (Y velocity of(immediate source entity))  vz: ((Z velocity of(immediate source entity)) * (1.6)))

 

That's it, you will need to use different parameter blocks than the procedure blocks come in, but I have marked each procedure block with parenthesis to differentiate between parameters.

Edited by Catnip on Fri, 12/01/2023 - 22:24
Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You might need to tweak the…
Thu, 11/23/2023 - 16:32

You might need to tweak the 1.6 depending on what you want to achieve, I have found that 1.6 modifiers for X and Z velocities allow it to fly straight while underwater, but a different modifier might be needed to get it to fly diagonally up or down.