I'm new to this and deed help with Output

Discuss macro implementations, ask for macro help (to share your creations, see User Creations, probably either Campaign Frameworks or Drop-in Resources).

Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice

Post Reply
thunderwolf5445
Kobold
Posts: 2
Joined: Sun Oct 18, 2020 11:12 am

I'm new to this and deed help with Output

Post by thunderwolf5445 »

whenever I Run this regardless of how i might change it the output is always
'' '' Elf has been healed for 65 HP!
or
'' , Elf has been healed for 345 HP! Elf has also been revived! ''
The Quotes are the problem as they are in the chat output itself where I just want it to display the sentences normally.
and the reason for the strings being in [r:"string"] form is something i thought might make a difference but the output is
exactly the same either way i type it also the reason for 4 IFs is i thought that might change it too. Here's the code.


[if(state.Dead == 0), CODE:{[h:isDead = "no"]}]
[if(state.Dead == 1), CODE:{[h:isDead = "yes"]}]
[if(isDead == "yes"), CODE:{[h:state.Dead = 0], [r:token.name][r:" has been healed for "][r:HealAmount][r:" HP! "][r:token.name][r:" has also been revived!"]}] -------Elf has been healed for 345 HP! Elf has also been revived!
[if(isDead == "no"), CODE:{[r:token.name][r:" has been healed for "][r:HealAmount][r:" HP!"]}] --- Name has been healed for 12 HP!

User avatar
aliasmask
Deity
Posts: 8624
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: I'm new to this and deed help with Output

Post by aliasmask »

Try something like this:

Code: Select all

[R: strformat("%{token.name} has been healed for %{HealAmount} HP!")]
[R, if(state.Dead): strformat(" %{token.name} has also been revived!"); ""]
[H: state.Dead = 0]

thunderwolf5445
Kobold
Posts: 2
Joined: Sun Oct 18, 2020 11:12 am

Re: I'm new to this and deed help with Output

Post by thunderwolf5445 »

Thanks so much, I was so frustrated, works like a charm now :D

Post Reply

Return to “Macros”