Jump to content
IGNORED

Teach me how to shorten this code if possible..


Words Fail

Recommended Posts

I just figured it out! Nice! Sort of on my own.. thanks for your guys help. It's not going to be as nice as your guys code, but at least I got something to work on my own and I understand what I did.

 

I made 3 collision detection subroutines..

 

First one coldet:

 

- checks player x pos. If your x pos is one on my list then it sets variable d and f and goes to coldet2 If it's not one of those x pos it returns.

 

coldet2:

 

- checks your y pos. If your y pos is one on my list then it sets variable e and goes to coldet3. If not it returns.

 

coldet3:
 

- if the playfield is on, then it uses pfhline d e f off to turn what I need off, does a c=c-1 and when c=0 then level cleared.

 

I used 3 variables, but for now it works and that's all I need.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...