Skip to content

Commit 74c2319

Browse files
sovdeethgitbook-bot
authored andcommitted
GITBOOK-56: event-value explanation
1 parent c3690a5 commit 74c2319

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

introduction/the-basics.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,12 @@ on consume:
228228
# code here
229229
```
230230

231+
{% hint style="info" %}
232+
See `event-item`? This is what's called an `event-value`. These are used to get information about the event. They follow the format of `[event-]type`, where type is, well, the type. If you want to know the event-values of an event, find it on the [SkriptHub](https://skripthub.net/docs/) or [SkUnity ](https://docs.skunity.com/syntax/)docs.
233+
234+
Here, we're getting the `event-item`, which is the item being consumed. The `consume` event also has `event-player`, too, which we'll use as `player`.
235+
{% endhint %}
236+
231237
Let's use the first one, it's cleaner and actually runs slightly better. Anyway, we need to give the player regeneration. You probably already know about `/effect give`, and we could use that if we wanted. But we should stick to Skript syntax as much as possible. After a quick search on the docs, we find the following:
232238

233239
```applescript

0 commit comments

Comments
 (0)