# ========================= FAKE DAMAGE ZONE ========================= # # Author: Optifyne (https://akcel.fun) # Video review: https://youtu.be/zCwBcrt8n4w # If you, perhaps, want to improve the system to make dynamic zone creation/changing/deletion, # with many zones support, with zone selection, radius settings and other things, # you can write to me and I will suggest what you will want, # but most likely soon will be a video about this system which will be "full", as I described. # CE AAPP Main - https://akcel.fun/ce-aapp # CE AAPP Wiki - https://optifynes-organization.gitbook.io/ce-aapp/ (you can find all necessary actions and placeholders there) # CE AAPP Spigot - https://www.spigotmc.org/resources/conditionalevents-actions-and-placeholders-pack-ce-aapp.123879/ # CE AAPP GitHub - https://github.com/Optifyne/CE-AAPP # ConditionalEvents plugin - https://www.spigotmc.org/resources/conditionalevents-custom-actions-for-specific-events-1-8-1-21-7.82271/ # ===== ACTIONS TO ACTIVATE THE FUNCTIONALITY EACH 2 SECONDS ===== # fakeDamageZoneStarter: type: repetitive_server # Activate the event periodically just for the server (without any "player" context) repetitive_time: 40 # Activate it every 40 ticks (2 seconds) actions: default: - 'manage_cycle: SYNC;run;fakeDamageZoneProcessor;0;last;1;,;%CEP_entitiesListInRadius_,_test_2_100225.500_79_100158.500_3_uuid_false_livingEntities%;fakeDamageZoneProcessor' # Run cycle through all entities in the specified zone # ===== ACTIONS OF THE MAIN FUNCTIONALITY ===== # fakeDamageZoneProcessor: type: call # Activate the event when we call it manually conditions: - '%v% != %empty%' # At least one entity should be in the zone actions: default: - 'play_hurt_animation: %v%;0' # Play hurt (damage) animation to this entity - 'playsound: %CEP_entity_hurtSound_,_{v}%;1;1;%CEP_entity_location:x,y,z,world_,_{v}%' # Play damage sound of this entity on its coordinates - 'change_velocity: %v%;UP_BACKWARD;0.2;0.3;true' # Push entity a bit up and backward to imitate the movement of the entity after damage