Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

DAMAGE/TOTEM events #6

Merged
merged 6 commits into from
Jul 1, 2024
Merged

DAMAGE/TOTEM events #6

merged 6 commits into from
Jul 1, 2024

Conversation

soup587
Copy link

@soup587 soup587 commented Jun 27, 2024

No description provided.

@soup587 soup587 changed the title half broken damage event (please fix) okayish damage event (please fix anyway) Jun 27, 2024
@soup587
Copy link
Author

soup587 commented Jun 27, 2024

local shouldRun = false
events.damage:register(function(entity, typeID, sourceCause, sourceDirect)
if entity ~= player then return end
shouldRun = not shouldRun
if not shouldRun then return end
--code here
end)

@soup587
Copy link
Author

soup587 commented Jun 27, 2024

above is a figura-side handler so the event works as expected with other events
(otherwise it will run for any entities that take damage and will get triggered twice)

@soup587 soup587 changed the title okayish damage event (please fix anyway) damage event Jun 28, 2024
@soup587
Copy link
Author

soup587 commented Jun 28, 2024

now at parity with my original figura pr, lacks getting the entity being damaged and only gets ran when the original player gets hurt but does run correctly across all clients

@soup587 soup587 marked this pull request as ready for review June 28, 2024 22:15
(fires whenever a player uses a totem)
(returning the event cancels the animation)
Fixed a newline issue with DAMAGE's docs
@soup587 soup587 changed the title damage event DAMAGE/TOTEM events Jun 29, 2024
@soup587
Copy link
Author

soup587 commented Jun 29, 2024

holy totems batman

@superpowers04 superpowers04 merged commit 0bcbcd4 into superpowers04:1.20 Jul 1, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants