Author Topic: Help with movement.  (Read 7539 times)

0 Members and 1 Guest are viewing this topic.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Help with movement.
« Reply #15 on: January 07, 2011, 12:19:57 am »
You know, if you can't get to the ram clear menu or are unable to clear your ram for some reason where taking out the batteries doesn't work, you can always take out the backup battery (which powers the ram) to guarantee a ram clear even if the calculator wasn't frozen.
For 1 minute, I assume, right? Because I removed all 5 batteries once, then immediately put them back, yet my RAM was still intact.

Hmm, that's weird.  Were you on the homescreen when you pulled the batteries?  Because pulling the batteries while on the home screen doesn't cause a RAM clear -- you have to be running a program or something.
Even when removing the lithium one too? And yeah I was on the home screen.

Offline Michael_Lee

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1019
  • Rating: +124/-9
    • View Profile
Re: Help with movement.
« Reply #16 on: January 07, 2011, 01:19:04 am »
Well...
I don't know about the lithium -- I've never had a reason to take it out, so I've no clue as to what would happen.
My website: Currently boring.

Projects:
Axe Interpreter
   > Core: Done
   > Memory: Need write code to add constants.
   > Graphics: Rewritten.  Needs to integrate sprites with constants.
   > IO: GetKey done.  Need to add mostly homescreen IO stuff.
Croquette:
   > Stomping bugs
   > Internet version: On hold until I can make my website less boring/broken.

Offline Masinini

  • LV2 Member (Next: 40)
  • **
  • Posts: 33
  • Rating: +0/-0
    • View Profile
Re: Help with movement.
« Reply #17 on: January 10, 2011, 09:59:21 pm »
Okay, So I was thinking about Movement programs, and I was wondering. I made a program That went like this.

.Movement
[FFFFFFFFFFFFFFFF->pic1
20->X
20->Y
Repeat getkey(54)
Pt-change(X,Y,pic1
dispgraph
Pt-change(X,Y,pic1
X+(Getkey(4) and X=/= edge )-(getkey(1) and x=/=1) -> X
Y+(getkey(3) and Y=/= Edge)-(getkey(2) and Y=/=1)-> Y
End.

When it displayed it, it displayed it at 20 20, then moved it to like 1, 6. When I tried to move the dot, it would move one space, and then go back to 1,6. Any idea what i am doing wrong?
Output(1,1,"By the pricking of my thumb"
Txt(1,1, "Something wicked this way comes."

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: Help with movement.
« Reply #18 on: January 11, 2011, 12:48:48 pm »
You can't use it like  "getKey(1) and X!=1" That will evaluate like "(getKey(1) and X)!=1", which is not what you want.
To get the correct order of operations, you either need to put parentheses around (X!=1) or else change the order to "X!=1 and getKey(1)"
Note: This goes for all of them, not just the part with getKey(1) ;)
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.

Offline Masinini

  • LV2 Member (Next: 40)
  • **
  • Posts: 33
  • Rating: +0/-0
    • View Profile
Re: Help with movement.
« Reply #19 on: January 11, 2011, 05:49:09 pm »
Alright, I understand what you mean. it was waiting for 1 and X to be pressed. I'll try a re-write tomorrow. And Imma post any other questions I have from now on.
Output(1,1,"By the pricking of my thumb"
Txt(1,1, "Something wicked this way comes."