Author Topic: HELP with game  (Read 2248 times)

0 Members and 1 Guest are viewing this topic.

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
HELP with game
« on: November 24, 2011, 09:55:36 pm »
Im making a game where a guy has a grappling hook and swings from the ceiling.

I had a lot of determination, but not getting the code right mixed with the annoying perpetual yells of my brothers has made me give up eventually.

Every thing pretty much works. Except for the line that is the rope of the grappling hook

(indented from croquette)

   If (getKey(54))*((H=0)+(H>40))*(B=0) ;Checks if ready
      X->S ;Stores X,Y, and Right/left to a new variable
      Y->T
      R->theta
      Repeat pxl-Test(S,T) ;S and T are the rope's top coordinates
         T--
         If theta ;If going right
            S++
         Else
            S--
         End
      End ; That moves the top of the rope up and to an angle in the player's facing direction until it hits something
;Some other stuff
End

It later draws the line with
Line(X+7,Y,S,T)

Any more code needed, just ask.
Help is desperately needed would be highly appreciated :)

The problem, is that when the player is in the air and grapples to the ceiling again, S seems to fall behind X, instead of going in front of it.

Also, sometimes it grapples to the floor, but that probably needs some signed << >> stuff to fix.
« Last Edit: November 24, 2011, 09:58:27 pm by epic7 »