Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
MythicMobs MythicMobs
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 135
    • Issues 135
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • MythicCraft
  • MythicMobsMythicMobs
  • Issues
  • #1006

Closed
Open
Created Nov 29, 2022 by James Crosby@CaptainThiccRich

noHit projectile end condition / decoupling onHit and onEnd

Summary

a problem found with using both onHit and onEnd with projectiles, leads to both skills being triggered when the projectile hits something a nice addition would be a way to separate the onEnd trigger from the onHit trigger, meaning they would be mutually exclusive - so if the projectile hit an entity, it wouldnt trigger the onEnd, and if it ended without hitting an entity, by either reaching its max duration, max range or by stopping at a block, it would finally trigger the onEnd trigger.

Usage

For example, a boomerang skill would throw a projectile, upon hitting something, it would stop the projectile and drop a boomerang item where the entity is - but if it doesnt hit anything, the projectile would return to the caster (likely by ending, itself, and firing a second missile back) then giving the boomerang item back to the caster when it eventually reaches the caster. as it stands, the first projectile would need to drop an item upon hitting an entity, however this would also trigger the onEnd condition, causing both an item to drop, and the boomerang's return skill to trigger.

Value

would add another dimension to projectile customisation, allowing distinction between contacting entities, and the projectile naturally ending.

Priority

I'm biased and would like to see it asap - but you do you bois

Implementation

either by changing how the onEnd trigger works within the projectile (not the best idea - as it would likely mess with peoples current set ups with the onEnd trigger) - or by adding a secondary trigger to the projectile class, such as noHit - that would immitate the on end mechanic, but wouldnt trigger if it made contact with an entity (other than terrain)

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking