How do I level up my hero using plotscripting?

From OHRRPGCE-Wiki
Jump to: navigation, search

Use the plotscript command set hero level(who, level) to change a hero's level. For instance, if you want to increment hero Bob's level by one, you can use this block of code:

variable (Bob)
Bob := find hero (hero:Bob)
if (Bob <> -1) then (
 #Bob is in the party
 set hero level (Bob, get hero level (Bob) + 1)
)

See the plotscripting dictionary for more information on set hero level.

You can also give heroes experience with the plotscript command give experience to level them up using the builtin experience system.

See Also[edit]