A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: [HELP] After I attach player, he dont move.

  1. #1
    I'm not Crazy :D
    Join Date
    Nov 2015
    Location
    Brazil [<o>]
    Posts
    86

    Question [HELP] After I attach player, he dont move.

    Hello guys, I make a code to enter in the tank with the SPACE key when the player standing in a ball on the floor.

    When the guy is in tank, press the SPACE key again to quit of the tank, and the code attach the player to random location of map, but the code to the move the player dont work when this occurs. Any idea to fix?
    Attached Files Attached Files

  2. #2
    . fruitbeard's Avatar
    Join Date
    Oct 2011
    Posts
    1,780
    Hi,

    This gets it to do what you want, play with it.

    The code and php tags are not working so Iposted it in a text file
    Last edited by fruitbeard; 11-11-2016 at 06:40 AM.

  3. #3
    I'm not Crazy :D
    Join Date
    Nov 2015
    Location
    Brazil [<o>]
    Posts
    86
    Hey man, tank you for the help. How to I change the player attach position to side of the tank. Per exemple, I get te tank position, and attach player with one centimeter away?

  4. #4
    . fruitbeard's Avatar
    Join Date
    Oct 2011
    Posts
    1,780
    Hi,

    You simply find the tanks x and y coordinates when calling the function then place your character somewhere within that range, do some testing.

  5. #5
    I'm not Crazy :D
    Join Date
    Nov 2015
    Location
    Brazil [<o>]
    Posts
    86
    I will test it. Thank you for idea.

  6. #6
    I'm not Crazy :D
    Join Date
    Nov 2015
    Location
    Brazil [<o>]
    Posts
    86
    Hey fruitbeard, I tested your code, worked perfectly and I made it attach the player to side of the tank, but I have one problem, when the guy exit of the tank, the circle come back to the stage, but dont is possible to enter in tank again. Any idea to fix?
    Attached Files Attached Files

  7. #7
    . fruitbeard's Avatar
    Join Date
    Oct 2011
    Posts
    1,780
    Hi,

    The code to do what you ask is within the code provided earlier, mess around with it.

    Without looking I believe you need to re attach your circle clip, or at least just make it visible/invisible

  8. #8
    I'm not Crazy :D
    Join Date
    Nov 2015
    Location
    Brazil [<o>]
    Posts
    86
    The circle appear, but it seems what the var player_tank dont change to false to habilite enter in tank again. I already checked te code, and it seems like everything is normal, but dont is true beacuse dont work. hahaha

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center