Suggestion Closed · Implemented

Throw Mechanic needs fromOrigin

#4593 opened by Unknown 2 years ago

Unknownreported this suggestion

Even when fromorigin and origin are both defined, the throw mechanic will always try to throw targets away from the caster.

This can be demonstrated with this skill, which should throw enemies away from the projectile hit location rather than the caster.

mob-timebomb-cast:
  Skills:
  - skill{s=mob-timebomb-fire;damage=6;range=64;radius=4;duration=2;
    origin=@SelfEyeLocation;branch=true} @forward{f=12;uel=true}

mob-timebomb-large-cast:
  Skills:
  - skill{s=mob-timebomb-fire;damage=6;range=64;radius=12;duration=6;
    origin=@SelfEyeLocation;branch=true} @forward{f=12;uel=true}

mob-timebomb-fire:
  Skills:
  - sound{s=item.trident.return;pitch=2;volume=0.9} @self
  - projectile{fo=true;tickInterpolation=1;syo=0;sfo=0;
    onTick=mob-timebomb-tick;
    onEnd=mob-timebomb-hit;
    b=ITEM;material=TNT;enchanted=true;
    ham=true;v=30;MaxRange=<skill.range|32>;i=1;g=0.2;hR=0.25;vR=0.25;hnp=true}
  
mob-timebomb-tick:
  Skills:
  - e:p{p=dust_color_transition;color1=#EE4B2B;color2=#DC143C;amount=1;size=0.8;speed=0;hS=0;vS=0} @ProjectileForward{f=0}
  
mob-timebomb-hit:
  Skills:
  - setvarloc{var=skill.originloc;v=@targetedlocation{yo=0.1}}
  - raytraceto{fo=true;origin=@VariableLocation{var=skill.originloc};md=<skill.range|64>;rw=1;
    locationskill=mob-timebomb-signal} @VariableLocation{var=skill.originloc;yo=-2}

mob-timebomb-signal:
  Skills:
  - setvariable{var=skill.currentradius;value=0;type=FLOAT}
  - setvariable{var=skill.duration;value="<skill.duration>*20+2";type=FLOAT} 

  - aura{d="<skill.var.duration>";i=1;fo=true;origin=@targetedlocation;
    ot=[
    - setvariable{var=skill.currentradius;value="<skill.radius|3>/<skill.var.duration>*(<skill.var.duration>-<skill.var.aura-duration>)";TYPE=FLOAT}
    - message{m="<skill.var.aura-duration> <skill.var.currentradius>"} @self
    - e:p{p=dust_color_transition;color1=#EE4B2B;color2=#DC143C;a=1;y=0.2} @RAO{p=12;radius=<skill.radius|5>;roty="<skill.var.aura-duration>"}
    - e:p{p=dust_color_transition;color1=#EE4B2B;color2=#DC143C;a=1;y=0.2} @RAO{p=12;radius=<skill.var.currentradius>;roty="<skill.var.aura-duration>"} 
    ];
    oe=mob-timebomb-explode} 
  - e:p{p=dust_color_transition;color1=#EE4B2B;color2=#DC143C;amount=4;speed=0.4;hS=0.25;vS=0.25} @targetedlocation

mob-timebomb-explode:
  Skills:
  - effect:particlesphere{p=dust_color_transition;color1=#EE4B2B;color2=#DC143C;a="18*<skill.radius|5>";r=<skill.radius|5>}
  - skill{s=mob-timebomb-hit-entity} @ENO{r=<skill.radius|5>}

mob-timebomb-hit-entity:
  Skills:
  - throw{fo=true;origin=@origin;velocity=10;velocityY=7}
  - damage{a=<skill.damage|6>;pi=true} 
  - skill{s=mob-timebomb-explode-sfx} @self
  - skill{s=mob-timebomb-explode-sfx} @origin

mob-timebomb-explode-sfx:
  Skills:
  - sound{s=entity.generic.explode;pitch=0.8;volume=2}
  - sound{s=entity.player.attack.crit;pitch=4} 

The relevant portion of this skill is mob-timebomb-hit-entity Cast behind an entity while standing in front, target will be thrown away from the caster instead of the projectile hit location.

Unknowncommented

[Legacy attachment omitted] Short video demonstration of issue here, a fix for this would reduce the amount of markers required for a functional AOE by an undeterminable amount per skill.

Unknowncommented

Throw doesn't have a fromOrigin option, so this isn't a bug. but I'll go ahead and add it.

Unknowncommented

Pog

Sign in to join the discussion.