# Is It Possible to Trigger an Alert with Image Targets?

**URL:** <https://forum.8thwall.com/t/is-it-possible-to-trigger-an-alert-with-image-targets/6143>\
**Category:** Technical Support\
**Tags:** image-targets\
**Created:** [April 21, 2025, 4:42pm UTC](https://forum.8thwall.com/t/is-it-possible-to-trigger-an-alert-with-image-targets/6143 "2025-04-21T16:42:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dominique\_Thomas](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.8thwall.com/dominique_thomas/32/2057_2.png) [@Dominique\_Thomas](https://forum.8thwall.com/u/Dominique_Thomas)\
**Post date:** [April 21, 2025, 4:42pm UTC](https://forum.8thwall.com/t/is-it-possible-to-trigger-an-alert-with-image-targets/6143/1 "2025-04-21T16:42:45Z")

</div>

I’m new to 8th Wall and learning about how to create AR apps. I wanted to try building a simple app that detects image targets and triggers an alert when one is recognized. Is this possible to do with the free version of 8th Wall?

---

<div class="post-metadata">

**Author:** ![GeorgeButler](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.8thwall.com/georgebutler/32/1903_2.png) [@GeorgeButler](https://forum.8thwall.com/u/GeorgeButler)\
**Post date:** [April 21, 2025, 4:43pm UTC](https://forum.8thwall.com/t/is-it-possible-to-trigger-an-alert-with-image-targets/6143/2 "2025-04-21T16:43:45Z")

</div>

Hi, welcome to the forums!

Yes! You can use the `imagefound` event. 🙂

```ts
import * as ecs from '@8thwall/ecs'

ecs.registerComponent({
  name: 'Hero Character',
  schema: {
  },
  schemaDefaults: {
  },
  data: {
  },
  stateMachine: ({world, eid}) => {
    ecs.defineState('idle')
      .initial()
      .onEnter(() => {
        ecs.GltfModel.set(world, eid, {
          animationClip: 'Idle_C',
          loop: true,
          timeScale: 100,
        })
      })
      .listen(world.events.globalId, 'reality.imagelost', (e) => {
        ecs.GltfModel.set(world, eid, {
          animationClip: 'Idle_C',
          loop: true,
          timeScale: 1,
          time: 0,
        })
      })
      .listen(world.events.globalId, 'reality.imagefound', (e) => {
        ecs.GltfModel.set(world, eid, {
          animationClip: '103571_Devouring_Appear',
          loop: false,
          timeScale: 0.6,
          time: 0,
        })
      })
      .listen(eid, ecs.events.GLTF_ANIMATION_FINISHED, () => {
        ecs.GltfModel.set(world, eid, {
          animationClip: 'Idle_C',
          loop: true,
          timeScale: 1,
          time: 0,
        })
      })
  },
})

```
