AS question (i need help)
- Inglor
-
Inglor
- Member since: Jan. 26, 2003
- Offline.
-
- Send Private Message
- Browse All Posts (10,869)
- Block
-
- Forum Stats
- Member
- Level 17
- Blank Slate
hello fellow actionscripters, is there any way to check hitTest of an entire leyer or a group of object? (just one hitTest)
- Inglor
-
Inglor
- Member since: Jan. 26, 2003
- Offline.
-
- Send Private Message
- Browse All Posts (10,869)
- Block
-
- Forum Stats
- Member
- Level 17
- Blank Slate
doesn't have to be a leyer, as long as it's an hittest of an object that does not include all the blank spaces within
- Edvin
-
Edvin
- Member since: Feb. 3, 2004
- Offline.
-
- Forum Stats
- Member
- Level 12
- Blank Slate
At 9/29/04 05:34 AM, Inglor wrote: hello fellow actionscripters, is there any way to check hitTest of an entire leyer or a group of object? (just one hitTest)
Make the whole thing a Movie Clip and make a regular hitTest ! That's wut I would do !
- Afro-Ninja
-
Afro-Ninja
- Member since: Mar. 2, 2002
- Offline.
-
- Send Private Message
- Browse All Posts (13,458)
- Block
-
- Forum Stats
- Moderator
- Level 44
- Game Developer
At 9/29/04 05:36 AM, Inglor wrote: doesn't have to be a leyer, as long as it's an hittest of an object that does not include all the blank spaces within
hmm... if you put them altogether in one MC and then use use hitTest with the shape detection I think that might work
if(_root.something.hitTest(_root.groupOfThings,true))//actions
adding the "true" parameter should make flash ignore all the blank space in between. But I've never used it myself so I don't know how good it works.
or if that was even what you were asking...
- Amish
-
Amish
- Member since: Mar. 13, 2003
- Offline.
-
- Forum Stats
- Member
- Level 16
- Blank Slate
you could store them all in the array and hittest in the arry. its not that hard really. if you want t knwo how. IM me on MSN.
- Deathcon7
-
Deathcon7
- Member since: Oct. 1, 2003
- Offline.
-
- Forum Stats
- Member
- Level 21
- Writer
Er, couldn't you use the good ol' for loop? What type of objects are you working with?
- GeoffCLogan
-
GeoffCLogan
- Member since: Apr. 25, 2004
- Offline.
-
- Forum Stats
- Member
- Level 11
- Blank Slate
Shapeflag...however that restricts it to only being able to detect a mass hitting against a single registration point(ala the players feet in a platform game)
To use shapeflag you would do something like
_root.groundMC.hitTest(_root.player._x,_root.player._y,true) which would test to see if the player mc's registration point hitTests the large mass.
Bah, you probably already know of this though.


