Verse Library verse

01 First You Write Some Code

Restores player health when a healing potion is consumed, showing basic state modification logic.

extracted-snippets/documentation/en-us/uefn/basics-of-writing-code-4-practice-time-in-verse/01-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 = "heal"):
set PlayerHealth = PlayerHealth + PotionHealAmount

Comments

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