USERNAME:
PASSWORD:
Save Info!
Logging in…
This topic is 1 page long.
[ Profile | Posts | Contact ]
Posted at: 7/24/09 09:14 AM
Sign-Up: 10/20/07
Posts: 862
I have all my other code ready, but I read somewhere that you can use hitTestObject to collide with any object with just one piece of code? By that, I mean something like:
function CheckHit(){ if(ball.hitTestObject()==true;){ //stuff } }
Yes, I have already made my checkHit function, that's not the error. Any help?
Click my sig for a hilarious thread.
Posted at: 7/24/09 10:12 AM
Sign-Up: 10/13/06
Posts: 947
At 7/24/09 09:14 AM, Wolfears2 wrote: I have all my other code ready, but I read somewhere that you can use hitTestObject to collide with any object with just one piece of code? By that, I mean something like: function CheckHit(){ if(ball.hitTestObject()==true;){ //stuff } } Yes, I have already made my checkHit function, that's not the error. Any help?
I don't really see a question there but hitTestObject checks well hitests with objects. So it would be if(ball.hitTestObject(someobject)==true) It can only check between 2 items.
Posted at: 7/24/09 10:54 AM
Sign-Up: 08/10/05
Posts: 6,027
Push everything on the stage into an array and loop through the array testing each one individually.
Portfolio(Under construction): UnknownFury.com | Msn: giant_ak_47@msn.com | Contact: me@unknownfury.com Follow me on twitter!
I'm trying to use that one hitTestObject to collide with all my other objects. So, Instead of making another check for every item, just on piece of code that covers all the items.
All times are Eastern Standard Time (GMT -5) | Current Time: 05:30 AM
<< Back