Verse Library verse

02 First You Write Some Code

Applies damage to player health when a damage potion is used, demonstrating conditional assignment.

extracted-snippets/documentation/en-us/uefn/basics-of-writing-code-4-practice-time-in-verse/02-first-you-write-some-code.verse

# Source URL: https://dev.epicgames.com/documentation/en-us/uefn/basics-of-writing-code-4-practice-time-in-verse
# Local doc:  epic-docs/documentation/en-us/uefn/basics-of-writing-code-4-practice-time-in-verse.md
# Section:    First You Write Some Code ...
if (PotionType = "damage"):
set PlayerHealth = PlayerHealth - PotionDamageAmount

Comments

    Sign in to vote, comment, or suggest an edit. Sign in