Omnimaga
Calculator Community => TI Calculators => Axe => Topic started by: Thundermagnet on November 09, 2011, 05:26:07 pm
-
This menu is messed up! It is going to be for Saintrunner's Mario Shotgun, but it only displays a box that says: "Quit." I am attempting to make it like the menu in the game Tank. If someone feels like taking the time to fix this, please do!
This is the menu:
:"Play"=>Str901
:"About"=>Str902
:"Help"=>Str903
:"Quit"=>Str904
:4=>X
:0=>V=>W
:Fix 5
//Ignore the Vs and Ws! They are there so I can shift the whole thing around.
:Line(V,W,V+21,W)
:Line(V,W,V,W+8)
:Line(V,W+8,V+21,W+8)
:Line(V+21,W,V+21,W+8)
:Text(V+2,W+1,Str901)
:Repeat getKey(54)
:If getKey(2) and X>1
:X-1=>X
:sub(PT)
:End
:If getKey(3) and X<4
:X+1=>X
:sub(PT)
:End
:DispGraph
:End
//End Main Loop
:Lbl PT
:If X=1
:Text(V+2,W+1,Str901)
:End
:If X=2
:Text(V+2,W+1,Str902)
:End
:If X=3
:Text(V+2,W+1,Str903)
:End
:If X=4
:Text(V+2,W+1,Str904)
:End
:Return
That was fun to write. There is probably a way to do that faster. ._.
-
I'm assuming => means store?
and it is supposed to be sub(X D)
it put an emoticon :P
-
ORDER OF OPERATIONS!!!11!1!!one!!
Instead of:
:If getKey(2) and X>1
:X--
:End
write:
:If getKey(2) and (X>1)
:X--
:End
That will probably help you. Axe uses left to right order of operations, in everything, always! And as for transcribing the code, you can download Croquette, I think there's a thread in a link in ephan or michael_lee's sig about it, and it opens calc source files and you can copy paste it into here.
-
I would say I love you but that would be weird.
Thank you sooooo much, this has fixed the problem.
Before I posted: :banghead:
After I posted: ;D
-
Try this :P
:"Play"=>Str901
:"About"=>Str902
:"Help"=>Str903
:"Quit"=>Str904
:Data(Str901{r},Str902{r},Str903{r},Str904{r})→Str90
:0→V→W+4→X
:Fix 5
:Line(V,W,V+21,W)
:Line(V,W,V,W+8)
:Line(V,W+8,V+21,W+8)
:Line(V+21,W,V+21,W+8)
:Text(V+2,W+1,Str901)
:Repeat getKey(54)
:If X>1 and getKey(2)
:X--
:sub(PT)
:End
:If x<4 and getKey(3)
:X++
:sub(PT)
:End
:DispGraph
:End
:Lbl PT
:Text(V+2,W+1)
:Text {X-1*2+Str90}{r}
:Return