change variable

Can you change a variable inside and IF Else statement?
I know this is not worded correctly, but I want health to decrease inside an ELSE statement.
Example - {if variable=true:You win!}{else dec health 5:You losing health.}
Any way to do this?

Try this...

{if variable: You win!}
{else: {@health-=5} You are losing health.}

The trick inside if-then logic is to use the following to set variables: {@a=1}. No set required.

Thanks. That does the trick.
As a follow-up....can I clear the screen with a command inside the else statement? Something like - {else: @clear: Game over.}

That might work. I really don't know. Testing is in order...

Doesn't work. Somehow I don't think Squiffy is capable to doing it.

This topic is now closed. Topics are closed after 60 days of inactivity.