# RPG character interactions

**URL:** <https://forum.kirupa.com/t/rpg-character-interactions/237165>\
**Category:** flash\
**Created:** [August 27, 2007, 7:53pm UTC](https://forum.kirupa.com/t/rpg-character-interactions/237165 "2007-08-27T19:53:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![justaj](https://avatars.discourse-cdn.com/v4/letter/j/7bcc69/32.png) [@justaj](https://forum.kirupa.com/u/justaj)\
**Post date:** [August 27, 2007, 7:53pm UTC](https://forum.kirupa.com/t/rpg-character-interactions/237165/1 "2007-08-27T19:53:53Z")

</div>

Hi guys,

I’ve been working with the tutorial SieferTim put together a few years ago ([http://www.kirupa.com/developer/actionscript/rpgprogramming4.htm](http://www.kirupa.com/developer/actionscript/rpgprogramming4.htm))and while i can make both the hero and enemy show up over a tile map, they don’t have any interactions with each other.

I have a simple hit test on the enemy:

onClipEvent(enterFrame) {  
if(\_root.guy\_mc.hitTest(this)) {  
\_root.hp–;  
}  
}

but no matter what when the hero passes over the enemy his HP does not decrease. my guess is that it has to do with the layers? i’ve created a whole new fla without tiles and such and just the two characters and the code works there. ideas?

any help would be appreciated

-AJ
