Quantcast
Channel: Help! with 2.0 - Twine Forum
Viewing all articles
Browse latest Browse all 1844

Going to a passage automatically/refreshing current passage? (Harlowe)

$
0
0
So I'm making a combat system, but currently I can't figure out how to automatically refresh the current passage to display updates to player and enemy health without using a (goto: "Combat Scene") to reopen the passage.

I decided to try and use a $currentpassage vareiable to help me change the target passage when necessary, but I can't get that to work in anything but a link, but I don't want it as a link, I want it to automatically go to the Passage matching the name of the string I saved in $currentpassage

Here is what I have written in the combat scene so far:
(set: $currentpassage to "Combat Scene")
(link-goto: "$currentpassage")
(print: $enemystats's Name)
HP: (print: $enemystats's Health)
(print: $enemystats's Description)


Player damage dealt last turn: $totalplayerdamagedealt

Enemy damage dealt last turn: $totalenemydamagedealt

[Attack]<Attack|

(click: ?Attack)[ 
(set: $totalplayerdamagedealt to 0)
(set: $totalplayerdamagedealt to it + (random: $playerstats's weaponmindamage, $playerstats's weaponmaxdamage) + $playerstats's Strength/2) 
(set: $enemystats's Health to it - $totalplayerdamagedealt - $enemystats's defense)
(goto: "$currentpassage")]

Viewing all articles
Browse latest Browse all 1844

Trending Articles