# Conditional hitTest

**URL:** <https://forum.kirupa.com/t/conditional-hittest/88916>\
**Category:** Uncategorized\
**Created:** [May 3, 2005, 3:36pm UTC](https://forum.kirupa.com/t/conditional-hittest/88916 "2005-05-03T15:36:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![projectbios](https://avatars.discourse-cdn.com/v4/letter/p/e95f7d/32.png) [@projectbios](https://forum.kirupa.com/u/projectbios)\
**Post date:** [May 3, 2005, 3:36pm UTC](https://forum.kirupa.com/t/conditional-hittest/88916/1 "2005-05-03T15:36:04Z")

</div>

Hi there, im having a bit of a problem with setting a condition on a hitTest.

I have an object that will stop either when it hits a wall or it hits another object in it’s way. I have an ‘if’ condition set if it hit’s the wall, but i can’t seem to get the }else if{ to work if it hits another object in its way… It’s probably my syntax.

can someone body lead me in the right direction?
