Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

damage cause in on damage of player not working for campfire or lava fire #3022

Closed
rudde0 opened this issue May 30, 2020 · 5 comments
Closed
Assignees
Labels
bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. completed The issue has been fully resolved and the change will be in the next Skript update.

Comments

@rudde0
Copy link

rudde0 commented May 30, 2020

on damage of player:
	if damage cause is drowning or contact or fire:
		send "damage cause is fire" to victim

Contact on sweet berries and drowning are working but fire is not working.

Server Information

  • Server version/platform: Paper 322
  • Skript version: 2.5 Alpha 3
@Whimsyturtle
Copy link
Member

Try burning. It's different from fire.

@Whimsyturtle Whimsyturtle added the waiting for reply The report needs a response from the reporter to determine course of action. label May 30, 2020
@rudde0
Copy link
Author

rudde0 commented May 30, 2020

burning fixes lava fire but campfire is same

@Whimsyturtle
Copy link
Member

I'm not sure, did you try using both at the same time?
... or burning or fire?

@Whimsyturtle Whimsyturtle added the bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. label May 30, 2020
@Whimsyturtle
Copy link
Member

I was able to replicate a comparison issue though,

on damage of player:
	if damage cause is lava or contact:
		send "damage detected" to victim

Doesn't work for detecting lava damage

But

on damage of player:
	if damage cause is lava:
		send "damage detected" to victim

Works for some reason.

@Whimsyturtle Whimsyturtle removed the waiting for reply The report needs a response from the reporter to determine course of action. label Jun 3, 2020
@APickledWalrus
Copy link
Member

image
Looks like there are some (major?) conflicts going on here. The two conditions are being parsed like

if the damage cause is equal to lava pop (visual effect) OR contact (damage cause)
if the damage cause is equal to lava (item)

There is a comparator for DamageCause - ItemType, so that's why the second conditions works.

@APickledWalrus APickledWalrus self-assigned this Oct 4, 2020
@ShaneBeee ShaneBeee added the completed The issue has been fully resolved and the change will be in the next Skript update. label Oct 22, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. completed The issue has been fully resolved and the change will be in the next Skript update.
Projects
None yet
Development

No branches or pull requests

4 participants