Quantcast
Channel: Questions in topic: "javascripting"
Viewing all articles
Browse latest Browse all 105

Add a variable into a statement?

$
0
0
I'm going through a scripting tutorial and it's talking about if statements. It has just shown me how to do... if (playerHealth <= 0) print ("You're Dead"); What if I wanted to do an else statement that does this... else { print (("You've taken ") enemyDamage (" damage!")); } ...to show how much damage the player has taken? Can't I add a variable into the statement?

Viewing all articles
Browse latest Browse all 105

Trending Articles