A Flash Developer Resource Site

Results 1 to 1 of 1

Thread: hitTest and mouse moving

  1. #1
    Junior Member
    Join Date
    Dec 2013
    Posts
    13

    hitTest and mouse moving

    hi , i am making a game where i can move more than one char with the mouse , i have made the mouse code and drawn the walls but i don't know how to make a hitTest code for it since it is moving by mouse , i know the hitTest code of the platform games , where i give the wall an instance name and say if char hits wall0 then char._x -= 5 , and make this **** for every single wall in the game , but i was wondering if there is a way to make a code for all the walls once not copy-paste the code for every wall where it says if char hits a wall see if it is horizontal or vertical and then see it's x and y , i tried to make some code like it but i messed my game up luckily i hadn't made so much effort in it , please help doods i would really appreciate it ^^

    my game isn't platform you can move freely to any direction
    Last edited by Zakillar; 02-19-2014 at 03:48 PM.

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