### Author Topic: nooboish prgrammer  (Read 8841 times)

0 Members and 1 Guest are viewing this topic.

#### obon7

• LV2 Member (Next: 40)
• Posts: 34
• Rating: +1/-1
##### Re: nooboish prgrammer
« Reply #15 on: November 22, 2011, 09:37:52 pm »
thanks but then how do you make it so it specifically says 0 potions and choosing that off the menu will work like other functions in a menu. Also once a list is created can you alter it by for example you use a potion or you find a potion. THX guys I just joined and am getting all of these replies makes me like the omnimaga community.

edit: in response to chattahippie
« Last Edit: November 22, 2011, 09:39:58 pm by obon7 »

#### mrmprog

• LV7 Elite (Next: 700)
• Posts: 559
• Rating: +35/-1
##### Re: nooboish prgrammer
« Reply #16 on: November 22, 2011, 09:40:21 pm »
Code: [Select]
:Lbl M:"for main menu:Menu("Options","Rest",1,"Fight"':Lbl 1:...Stuff:Goto M:Lbl 2:Menu("Fight","Use Sword",3,"Use Bow",4,"Back",M:Lbl 3:...stuff:Goto M:Lbl 4:...stuff:Goto MLike this?

#### saintrunner

• Custom Spriter: You ask it! I'll Make it!
• LV10 31337 u53r (Next: 2000)
• Posts: 1787
• Rating: +115/-11
• Flogging Molly
##### Re: nooboish prgrammer
« Reply #17 on: November 22, 2011, 09:40:53 pm »
there are ways, like I said, I could do all this in like 1 hour in axe lol
and just so you know you should double post within 6 hours, just use the modify button!
« Last Edit: November 22, 2011, 09:41:39 pm by saintrunner »
My Sprites Thread   :Updated often for your viewing pleasure

GAMES:
Spoiler For Spoiler:

#### obon7

• LV2 Member (Next: 40)
• Posts: 34
• Rating: +1/-1
##### Re: nooboish prgrammer
« Reply #18 on: November 22, 2011, 09:47:24 pm »
I guess it may not be possible but I envision more like in the menu that I have posted you could simply choose inventory and that would take you too a different screen that shows all the items you have found or bought and be able to use for example a health potion or something.

#### chattahippie

• LV6 Super Member (Next: 500)
• Posts: 358
• Rating: +27/-0
• Super Member! :D
##### Re: nooboish prgrammer
« Reply #19 on: November 22, 2011, 09:47:24 pm »
Okay, here is the code for a simple menu:

Code: [Select]
"Set up variables{0,4,5->L12->Y"Y will be used for the cursor0->G"G will be for key pressesOutput(1,1,"INVENTORYOutput(2,2,"PotionsOutput(3,2,"ApplesOutput(4,2,"FeathersOutput(2,10,L1(1Output(3,10,L1(2Output(4,10,L1(3While G=/=23"23 is the code for [mode]getKey->GIf Ans =/=0ThenOutput(Y,1,"_""Where _ is spaceY+(G=34)(Y=/=4)-(G=25)(Y=/=2)->YOutput(Y,1,">"Then for jumping to other codeIf (G=105) and (Y=2)Goto PO" jump to potion code or code potions hereIf (G=105) and (Y=3)Goto AP"apple code jump or here"repeat for Feathers"EndEndTry that, should work okay
Tell me if you have questions, or if it doesn't work

#### mrmprog

• LV7 Elite (Next: 700)
• Posts: 559
• Rating: +35/-1
##### Re: nooboish prgrammer
« Reply #20 on: November 22, 2011, 09:49:06 pm »
If you want something like this:

Where it shows how many potions you have, tell me.
You can use a custom menu, or a manipulated OS one
« Last Edit: November 22, 2011, 09:49:52 pm by mrmprog »

#### obon7

• LV2 Member (Next: 40)
• Posts: 34
• Rating: +1/-1
##### Re: nooboish prgrammer
« Reply #21 on: November 22, 2011, 09:51:31 pm »
Okay, here is the code for a simple menu:

Code: [Select]
"Set up variables{0,4,5->L12->Y"Y will be used for the cursor0->G"G will be for key pressesOutput(1,1,"INVENTORYOutput(2,2,"PotionsOutput(3,2,"ApplesOutput(4,2,"FeathersOutput(2,10,L1(1Output(3,10,L1(2Output(4,10,L1(3While G=/=23"23 is the code for [mode]getKey->GIf Ans =/=0ThenOutput(Y,1,"_""Where _ is spaceY+(G=34)(Y=/=4)-(G=25)(Y=/=2)->YOutput(Y,1,">"Then for jumping to other codeIf (G=105) and (Y=2)Goto PO" jump to potion code or code potions hereIf (G=105) and (Y=3)Goto AP"apple code jump or here"repeat for Feathers"EndEndTry that, should work okay
Tell me if you have questions, or if it doesn't work

That might work although I don't think that if you ran out of health potions they would  disappear , also you might want to use disp instead of output ; unless that is on purpose.

#### obon7

• LV2 Member (Next: 40)
• Posts: 34
• Rating: +1/-1
##### Re: nooboish prgrammer
« Reply #22 on: November 22, 2011, 09:53:02 pm »
also I don't have much experience with using getkey .............. hehehe like I said I'm kind of  a noob.

#### chattahippie

• LV6 Super Member (Next: 500)
• Posts: 358
• Rating: +27/-0
• Super Member! :D
##### Re: nooboish prgrammer
« Reply #23 on: November 22, 2011, 09:55:09 pm »
You could use Disp for the first 4 Outputs, just be sure to put a space in front of the items. The final three must be Output commands
And no, the potions would not disappear if you had zero; you would have to check in the code to see if you had potions before you used them
For example,
Where I said If (G=105) and (Y=2)
You should change to If (G=105) and (Y=2) and (L1(1)>0)
This will check to see if there are any potions left, and will run the code following it only if all of the conditions are met

#### obon7

• LV2 Member (Next: 40)
• Posts: 34
• Rating: +1/-1
##### Re: nooboish prgrammer
« Reply #24 on: November 22, 2011, 10:01:44 pm »
so i am just wondering if the getkey stuff is necessary because wiht a normal menu you could just use the arrow keys numpad and enter button. Questions: does it specifically say how many potions there are on the menu and does every item availble in the game need to be already existing in the menu and if so will it show how many you have so( not yet fouund items will display a 0 next to the name)

#### obon7

• LV2 Member (Next: 40)
• Posts: 34
• Rating: +1/-1
##### Re: nooboish prgrammer
« Reply #25 on: November 22, 2011, 10:03:19 pm »
output allows you to display something at a certain point
for example:
:output(1,1,"hi"

will make it appear at point 1,1 on the screen, or the upper left corner!

AND DON'T DOUBLE POST!

and read this  http://www.ticalc.org/programming/columns/83plus-bas/cherny/
Yeah i looked there but It didn't help that much also another person said to double post so........

#### chattahippie

• LV6 Super Member (Next: 500)
• Posts: 358
• Rating: +27/-0
• Super Member! :D
##### Re: nooboish prgrammer
« Reply #26 on: November 22, 2011, 10:08:35 pm »
output allows you to display something at a certain point
for example:
:output(1,1,"hi"

will make it appear at point 1,1 on the screen, or the upper left corner!

AND DON'T DOUBLE POST!

and read this  http://www.ticalc.org/programming/columns/83plus-bas/cherny/
Yeah i looked there but It didn't help that much also another person said to double post so........
Here are the official rules
Quote
4: The only time double-posting is allowed (posting two messages in a row in the same topic) is either if there has been 6 hours since your last post, 3 hours if your thread has been bumped out of the New Posts page, 1 hour if it's a project update or immediately if you need to upload more than 10 file attachments at once. Otherwise, update the last post using the "EDIT" button. It will be marked as unread for all members (altough it won't bump the thread).

EDIT:  Yes, if you want the numbers to be displayed, I suggest using all the getKey stuff.  It will look much nicer than the default menu, and is more customizable
And the zero is expected. With that code, it is what it is supposed to do
« Last Edit: November 22, 2011, 10:10:09 pm by chattahippie »

#### mrmprog

• LV7 Elite (Next: 700)
• Posts: 559
• Rating: +35/-1
##### Re: nooboish prgrammer
« Reply #27 on: November 22, 2011, 10:08:56 pm »
Err, You really shouldn't double post. And saintrunner, no need to "yell" at a newer member. When you joined, you were by no means perfect, but look at you now, a productive member of the community

#### saintrunner

• Custom Spriter: You ask it! I'll Make it!
• LV10 31337 u53r (Next: 2000)
• Posts: 1787
• Rating: +115/-11
• Flogging Molly
##### Re: nooboish prgrammer
« Reply #28 on: November 22, 2011, 10:09:57 pm »
Getkey's are easier (in my opinion) in axe. and the reason you need it in chatta's example is because he made it self modified. in other words, it looks the same as the menu( function but it is written out so it can be adjusted

And yeah your right, I don't meen to yell, I'm just bad at explaining, so I'm really yelling at myself... sorry
« Last Edit: November 22, 2011, 10:11:13 pm by saintrunner »
My Sprites Thread   :Updated often for your viewing pleasure

GAMES:
Spoiler For Spoiler:

#### obon7

• LV2 Member (Next: 40)
• Posts: 34
• Rating: +1/-1
##### Re: nooboish prgrammer
« Reply #29 on: November 22, 2011, 11:08:19 pm »
quick question how do you alter a list so that its size can be increased and display the new item and not have to hav ea preset name for each slot.