You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/events/logicblock_name_hit.md
+48-5Lines changed: 48 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,9 +11,52 @@ Event is posted by [counters:](../config/counters.md), [accruals:](../config/acc
11
11
12
12
The logic block (name) was just hit.
13
13
14
-
Note that this is the default hit event for logic blocks, but this can
15
-
be changed in a logic block's "events_when_hit:" setting, so this
16
-
might not be the actual event that's posted for all logic blocks in
17
-
your machine.
14
+
Note that this is the default completion event for logic blocks, but
15
+
this can be changed in a logic block's `events_when_hit:`
16
+
setting, so this might not be the actual event that's posted for all
17
+
logic blocks in your machine.
18
18
19
-
--8<-- "event_no_keywords_notice.md"
19
+
#### Deprecation warning:
20
+
21
+
In previous versions of MPF, the event `counter_(name)_hit` was used for counters instead of this event, `logicblock_(name)_hit`.
22
+
Currently, both events are posted together (if you have not provided a custom [`events_when_hit`](../config/counters.md#events_when_hit) value for the counter),
23
+
but `counter_(name)_hit` is considered deprecated and may be removed in future versions of MPF.
24
+
25
+
26
+
## Keyword arguments
27
+
28
+
(See the [Conditional Events](overview/conditional.md)
29
+
guide for details for how to create entries in your config file that
30
+
only respond to certain combinations of the arguments below.)
31
+
32
+
Accruals, Counters, and Sequences each have different keyword arguments.
33
+
34
+
### Accrual Keyword arguments
35
+
36
+
#### `step`:
37
+
38
+
The 0-based integer number of the step that was just hit.
39
+
40
+
### Counter Keyword arguments
41
+
42
+
If the counter has a config setting for `count_complete_value`,
43
+
`count`, `hits` and `remaining` towards that goal will be included as arguments.
44
+
If `count_complete_value` is `None`, then only `count` will be included.
45
+
46
+
#### `count`:
47
+
48
+
The current value of the counter.
49
+
50
+
#### `hits`:
51
+
52
+
The numbers of hits made on this counter.
53
+
54
+
#### `remaining`:
55
+
56
+
The numbers of hits remaining before completing this counter.
57
+
58
+
### Sequence Keyword arguments
59
+
60
+
#### `step`:
61
+
62
+
The 0-based integer number of the step that was just hit.
0 commit comments