|
-
Always needs help
Collision with two target objects
I'm very new to 3DFA, and I know how to do collision. But, how do I do collision between 1 thing I am controlling and two things I want to avoid? The thing I am controlling is called circle, and the two others are square and square2.
My script:
if (circle.collideRect (square || square2)){
loser.show()
}
if (!(circle.collideRect (square || square2))){
loser.hide()
}
Loser is the message.
Help please!
Last edited by marinebro0306; 07-26-2005 at 10:07 PM.
-
From what you described it sounds like all you want to do is:
if (circle.collideRect (square) || circle.collideRect (square2)){
loser.show()
}else{
loser.hide()
}
Assuming that element loser is already hidden I would even skip the "else" part of this statement.
-
KoolMoves Moderator
Almost because if you collide and want the message to re-hide when they no longer collide you do need it.
-
Yes, makes sense when you put it that way.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|