Be a Supporter!

as2 hittest coordinates help

  • 336 Views
  • 2 Replies
New Topic Respond to this Topic
Bum-Secks
Bum-Secks
  • Member since: Oct. 12, 2005
  • Offline.
Forum Stats
Member
Level 04
Blank Slate
as2 hittest coordinates help 2010-05-13 16:23:58 Reply

i can't seem to figure out how this should work. What i'm trying to do is create a hittest that's a certain length and not just a single coordinate.
if(this.hitTest(_root.box._x, _root.box._y>0, true)&&this.hitTest(_root.box._x, _root.box._y<50, true)){
this.dosomethingcool("pls");
}
with this script, instead of the guy hitting the coordinates of the box, it's only reacting to the coordiantes of the stage. How do i use greater than and less than for stuff like that?

as2 hittest coordinates help

Hoeloe
Hoeloe
  • Member since: Apr. 29, 2004
  • Offline.
Forum Stats
Member
Level 37
Game Developer
Response to as2 hittest coordinates help 2010-05-13 17:18:33 Reply

You can't.

You need to define certain points at a distance apart, or use a for loop.


Song of the Firefly is on Steam Greenlight and Kickstarter. Give them a look and support the project!
------------------------------

BBS Signature
Bum-Secks
Bum-Secks
  • Member since: Oct. 12, 2005
  • Offline.
Forum Stats
Member
Level 04
Blank Slate
Response to as2 hittest coordinates help 2010-05-13 17:34:36 Reply

damn there goes my plans for the hittests. It'll probably work better if i use invisible mc hittests rather than having a bunch of loops running though