# HELP: RPG hittest surroundings

**URL:** <https://forum.kirupa.com/t/help-rpg-hittest-surroundings/257134>\
**Category:** programming\
**Created:** [April 10, 2008, 2:35pm UTC](https://forum.kirupa.com/t/help-rpg-hittest-surroundings/257134 "2008-04-10T14:35:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![maxbroens](https://avatars.discourse-cdn.com/v4/letter/m/6a8cbe/32.png) [@maxbroens](https://forum.kirupa.com/u/maxbroens)\
**Post date:** [April 10, 2008, 2:35pm UTC](https://forum.kirupa.com/t/help-rpg-hittest-surroundings/257134/1 "2008-04-10T14:35:39Z")

</div>

Hello people,

Im creating a rpg.  
[http://www.maxxdesign.nl/rpg/hometown.swf](http://www.maxxdesign.nl/rpg/hometown.swf)

The character moves arround happy(lol), but i dont want him to walk over the house or the tree. So i put a hittest on each butten(left,right,up,down) with the tree as obstacle. But now i am going to add more obstacles, so like the house and a river etc. Do i have to create a hittest for each object? As you can see i tried something with red dots, but that doenst work either.

or is there a better / other way to create obstacles?  
(by the way: i removed all the hittests at the moment, so thats why no hittest is in the above swf)
