The forums have permanently moved to forum.kirupa.com. This forum will be kept around in read-only mode for archival purposes. To learn how to continue using your existing account on the new forums, check out this thread.


Results 1 to 2 of 2

Thread: need help with platform code

  1. #1

    need help with platform code

    if (air == false && !Key.isDown(Key.LEFT) && !Key.isDown(65) && _currentframe <4 or air == false && !Key.isDown(Key.RIGHT) && !Key.isDown(65) && _currentframe <4 or air == false && !Key.isDown(Key.CONTROL) && !Key.isDown(65) && _currentframe <4){
    state = 1;
    }
    if (Key.isDown(Key.LEFT) && air == false && !Key.isDown(65) && _currentframe <4 or Key.isDown(Key.RIGHT) && air == false && !Key.isDown(65) && _currentframe <4) {
    state = 2;
    }
    if (Key.isDown(Key.CONTROL) && air == false && !Key.isDown(65) && _currentframe <4){
    state = 4;
    }
    if (!Key.isDown(65)) {
    gotoAndStop(state);
    }



    This is my code for changing the stance or state of my player.
    However, When I want him to attack, he goes into an infinite attack loop(attack is state 4) How can I fix this?

  2. #2
    ahem,
    BUMP

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012