- Dec 25, 2019
- 177
- 260
Hi there , it's me again.
So i'm old and tired (It's 1am) and i have a small problem that tired brain can't grasp. Hopefully one of you kind souls will let me know the answer so i can finish up the part i'm working on and move on in the am.
The problem is i have a (mostly) working combat system in place but at the end of combat i want to restore the players healh to full (including any bonuses that i may add later)
but i can't figure out how to do it. I've tried a few things but nothing seems to work.
This is the where i think it need to go. I tried to use
$playerhealth=5 (5 is the starting value for now) which would work early game, but later on the player may find armour or items that increase that base stat so it would only add 5 instead of restoring it to whatever the value would be.
(I hope that makes sense)
Thanking you in advance.
A grumpy, tired, old git.
So i'm old and tired (It's 1am) and i have a small problem that tired brain can't grasp. Hopefully one of you kind souls will let me know the answer so i can finish up the part i'm working on and move on in the am.
The problem is i have a (mostly) working combat system in place but at the end of combat i want to restore the players healh to full (including any bonuses that i may add later)
but i can't figure out how to do it. I've tried a few things but nothing seems to work.
Code:
label victory:
init python:
import random
$randomnum = random.randint(5,100) # (adds a random amount of money to the player)
hide skeleton
nar "After defeating the skeletal monstrocity it's remains disappear but your coinpurse feels heavier."
$gold += randomnum
hide screen display_health
return
$playerhealth=5 (5 is the starting value for now) which would work early game, but later on the player may find armour or items that increase that base stat so it would only add 5 instead of restoring it to whatever the value would be.
(I hope that makes sense)
Thanking you in advance.
A grumpy, tired, old git.
Last edited: