Hi guys! It's joeyapplepi, back from a long hiatus from game making. I'm trying my hand at a different game now, an RPG, but I can't seem to figure out how to do something.
Basically, my aim is to have the level of the enemy you're fighting appear in the text that scrolls during the battle. For instance:
"You encounter a level [insert enemy level here] foe!"
The problem is, every time I try to put the value in between the quotes, it simply reads it as part of the dialog. Is there any way to separate the dialog from the variable being picked out of the enemy object?
Develop games in your browser. Powerful, performant & highly capable.
"You encounter a level " &EnemyLevel + " foe!"[/code:2eyvqjr4]
&EnemyLevel would be your value with the & symbol before it.
Include spaces within the quotes.
Also, the wiki has a couple of examples of using the two different operators (+ and &), under 'Building strings with &' on this page:
There are a few handy bits of info on that page.
Yes, certainly look at the Wiki first when you are stuck with something
While not complete, it's a great starting point!
Thanks guys. I appreciate the help!