Results 1 to 2 of 2
  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

Similar Threads

  1. Post html code in question
    By waffe in forum Forum Guidelines/Suggestions
    Replies: 12
    Last Post: January 24th, 2008, 03:33 PM
  2. Replies: 0
    Last Post: March 10th, 2004, 01:08 PM
  3. Viewing Code
    By .soulty in forum ActionScript 2 (and Earlier)
    Replies: 10
    Last Post: July 9th, 2003, 04:41 PM
  4. aaah please help with this code?
    By ave in forum ActionScript 2 (and Earlier)
    Replies: 12
    Last Post: May 6th, 2003, 12:34 PM
  5. code consolidation
    By subquark in forum ActionScript 2 (and Earlier)
    Replies: 15
    Last Post: January 21st, 2003, 08:45 PM

Bookmarks

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