I've just started working with Skript yesterday. I've written a simple script that should prevent a player from taking damage from dragon's breath.
Skript Version: v2.2-dev25
Skript Author:
Minecraft Version: 1.11.2
---
Full Code:
Loading the script returns no error, but the script does not prevent the player from taking damage from dragon's breath.
On the other hand, replacing dragon's breath by attack does prevent the player from taking damage.
(Before I learned about the dragon's breath damage cause, I was using this workaround: [edit: improved workaround script]
It's not very robust, though.)
How can I fix this?
For what it's worth the dragon's breath damage cause is apparently new: It doesn't appear in the SkUnity documentation yet, but it is documented at http://bensku.github.io/Skript/classes.html , which is written for a slightly older version (v2.2-dev23) than the one I'm using (v2.2-dev25).
Troubleshooting:
Have you tried searching the docs? Yes
Have you tried searching the forums? Yes
What other methods have you tried to fix it?
Skript Version: v2.2-dev25
Skript Author:
Minecraft Version: 1.11.2
---
Full Code:
code_language.skript:
on damage of player:
damage was caused by dragon's breath
cancel event
Loading the script returns no error, but the script does not prevent the player from taking damage from dragon's breath.
On the other hand, replacing dragon's breath by attack does prevent the player from taking damage.
(Before I learned about the dragon's breath damage cause, I was using this workaround: [edit: improved workaround script]
Code:
...
victim is in "world_the_end"
damage was caused by attack
attacker is not a living entity
attacker is not a player
...
How can I fix this?
For what it's worth the dragon's breath damage cause is apparently new: It doesn't appear in the SkUnity documentation yet, but it is documented at http://bensku.github.io/Skript/classes.html , which is written for a slightly older version (v2.2-dev23) than the one I'm using (v2.2-dev25).
Troubleshooting:
Have you tried searching the docs? Yes
Have you tried searching the forums? Yes
What other methods have you tried to fix it?
Last edited: