Date: 2024/07/28 00:53:36 UTC-07:00
Type: Denizen Script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
test_dummy:
type: command
name: test_dummy
description: spawns in a test dummy
usage: /test_dummy
permission: op
aliases:
- td
script:
- spawn test_dummy_ent <player.location>
test_dummy_ent:
type: entity
entity_type: husk
debug: false
mechanisms:
max_health: 1
health: 1
has_ai: false
silent: true
test_dummy_ent_handle:
type: world
debug: false
events:
on test_dummy_ent damaged:
- determine passively cancelled
- flag <context.entity> damage_taken:+:<context.damage>
- if damage_stacker in <util.runlater_ids>:
- adjust system cancel_runlater:damage_stacker
- runlater damage_track_run id:damage_stacker delay:1.5s def:<context.entity>
damage_track_run:
type: task
debug: false
definitions: entity
script:
- fakespawn text_display[text=<&c>[<&l><[entity].flag[damage_taken].round_to[2]><&c>];pivot=center;background_color=<color[#ffffff].with_alpha[0]>;interpolation_start=0;interpolation_duration=1.5s] <[entity].eye_location.random_offset[1]> duration:1.5s save:bar players:<server.online_players>
- flag <[entity]> damage_taken:!
- wait 3t
- adjust <entry[bar].faked_entity> translation:0,2,0