Author Topic: Displaying Variables  (Read 2751 times)

0 Members and 1 Guest are viewing this topic.

Offline Siphonic_Sugar

  • LV3 Member (Next: 100)
  • ***
  • Posts: 51
  • Rating: +0/-0
    • View Profile
Displaying Variables
« on: April 28, 2015, 09:10:51 pm »
Okay, so I am kind of new to axe, so could someone do a little explaining!  Whenever I try to make a game (using the graph screen), I usually have to display variable for the amount of ammo my character has.  Well, whenever I type in Text(0,0,A), it displays a bunch of random pixels and stuff that I can't read.  Could someone explain to me how to display a variable? :-\. It's one of the most basic things an I can't find ANY tutorials that explain it!  :banghead:
I'm on Codewalr.us now too, you should check it out.
<a href="https://codewalr.us"><img src="https://codewalr.us/other/cwaffiliate.png" /></a>

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Displaying Variables
« Reply #1 on: April 28, 2015, 09:30:06 pm »
If you're just starting with Axe, I'd highly recommend reading the included Documentation.pdf file (also available online here). Although it's a bit outdated and doesn't cover more advanced commands and techniques, it can provide a good base understanding of the language.

This happens to include the answer to your problem on page 9, which explains that you have to append the ▶Dec token to a value to display it as a number. For your example, you'd want to use Text(0,0,A▶Dec). And the next page explains when and how to use the display commands without the ▶Dec modifier, which may give you a rough understanding of where the garbage you saw is coming from.

I'd also highly suggest perusing through the included Commands.html file (also available online here) once you feel you have a working understanding of the language basics. Although it doesn't explain things as fully as the documentation does or provide examples, it is kept completely up to date and briefly documents every command available in Axe.
« Last Edit: April 28, 2015, 10:05:46 pm by Runer112 »

Offline Siphonic_Sugar

  • LV3 Member (Next: 100)
  • ***
  • Posts: 51
  • Rating: +0/-0
    • View Profile
Re: Displaying Variables
« Reply #2 on: April 28, 2015, 10:03:38 pm »
Wow, I wonder why I never saw that in the pdf file thing!  Thanks though! :)
I'm on Codewalr.us now too, you should check it out.
<a href="https://codewalr.us"><img src="https://codewalr.us/other/cwaffiliate.png" /></a>