#  ![](https://www.realm667.com/media/kunena/topic_icons/realm667/user/map.png) Item activation question

##

- **doomedarchviledemon**
- ![doomedarchviledemon's Avatar](https://www.realm667.com/media/kunena/avatars/resized/size144/users/avatar209.png) Topic Author
- Pain Elemental
- ![Pain Elemental](https://www.realm667.com/media/kunena/ranks/rank_9_pain.png)

 Less More- Posts: 258
-
-
-

   9 years 10 months ago - 9 years 10 months ago [\#4800](#4800) by doomedarchviledemon  *[Item activation question](https://www.realm667.com/forum/the-workshop/796-item-activation-question#4800 "I am trying to get a usable item to 'activate' when an enemy walks over it but cannot figure out how to make something 'activate' when an enemy makes contact. I have been looking at the Land Mine...")* was created by *doomedarchviledemon*

 I am trying to get a usable item to 'activate' when an enemy walks over it but cannot figure out how to make something 'activate' when an enemy makes contact. I have been looking at the Land Mine Layer weapon as an example but don't understand what I am doing differently to make my Bear Trap item not work. Any help would be appreciated.

[ Bear Trap](https://www.dropbox.com/s/nwk0z0gnc3m4u3d/BearTrap.wad?dl=0)

 Last edit: 9 years 10 months ago by doomedarchviledemon.

Please [Log in](https://www.realm667.com/component/users/login?return=aHR0cHM6Ly93d3cucmVhbG02NjcuY29tL2ZvcnVtL3RoZS13b3Jrc2hvcC83OTYtaXRlbS1hY3RpdmF0aW9uLXF1ZXN0aW9u&Itemid=2662) or [Create an account](https://www.realm667.com/component/users/registration?Itemid=2662) to join the conversation.

- **MagicWazard**
- ![MagicWazard's Avatar](https://www.realm667.com/media/kunena/avatars/resized/size144/users/avatar517.png)
- Moderator
- ![Moderator](https://www.realm667.com/media/kunena/ranks/rank_20_barrel.png)

 Less More- Posts: 808
-
-
-
-

   9 years 10 months ago [\#4808](#4808) by MagicWazard  Replied by *MagicWazard* on topic *[Item activation question](https://www.realm667.com/forum/the-workshop/796-item-activation-question#4808 "I am trying to get a usable item to 'activate' when an enemy walks over it but cannot figure out how to make something 'activate' when an enemy makes contact. I have been looking at the Land Mine...")*

 Well, for starters, the BearTrapSet actor doesn't have any properties that give it collision, such as either +SOLID or PROJECTILE. The Mine Layer mine is treated as a projectile; so, I added the following flags to give BearTrapSet projectile-style properties:
+MISSILE (gives it collision)
-NOGRAVITY (so it doesn't "fly")
+NOEXPLODEFLOOR (so it doesn't "die" when it hits the floor)

However, even then, the BearTrapSet actor wouldn't "die" if a monster contacted it. The workaround I found was to set the damage from 0 to 1. For some reason, I guess, if the "projectile" doesn't cause any damage, it doesn't "die" when a monster walks into it.

I'll be honest--I don't know the absolute best way to rig something like this up. But hopefully this at least is a start.

Please [Log in](https://www.realm667.com/component/users/login?return=aHR0cHM6Ly93d3cucmVhbG02NjcuY29tL2ZvcnVtL3RoZS13b3Jrc2hvcC83OTYtaXRlbS1hY3RpdmF0aW9uLXF1ZXN0aW9u&Itemid=2662) or [Create an account](https://www.realm667.com/component/users/registration?Itemid=2662) to join the conversation.

- **ozymandias81**
- ![ozymandias81's Avatar](https://www.realm667.com/media/kunena/avatars/resized/size144/users/avatar933.gif)
- Pain Elemental
- ![Pain Elemental](https://www.realm667.com/media/kunena/ranks/rank_9_pain.png)

 Less More- Posts: 258
-
-
-
- [](https://ozymandias81.wixsite.com/ozy81-site)
-

   9 years 10 months ago [\#4809](#4809) by ozymandias81  Replied by *ozymandias81* on topic *[Item activation question](https://www.realm667.com/forum/the-workshop/796-item-activation-question#4809 "I am trying to get a usable item to 'activate' when an enemy walks over it but cannot figure out how to make something 'activate' when an enemy makes contact. I have been looking at the Land Mine...")*

 Before my pc nearly death, I was in the way to test something with switchabledecorations through Thing_Spec MonsterTrigger activation and BUMPSPECIAL flags + this actor from Blade of Agony. Dunno if it will be of some help for the purpose but I thought it was good to left my thinkings here. Sorry for the shitty way to post this, my phone don't know good manners.

https://github.com/Realm667/WolfenDoom/blob/master/actors/hazards/mine.txt

Please [Log in](https://www.realm667.com/component/users/login?return=aHR0cHM6Ly93d3cucmVhbG02NjcuY29tL2ZvcnVtL3RoZS13b3Jrc2hvcC83OTYtaXRlbS1hY3RpdmF0aW9uLXF1ZXN0aW9u&Itemid=2662) or [Create an account](https://www.realm667.com/component/users/registration?Itemid=2662) to join the conversation.

- **doomedarchviledemon**
- ![doomedarchviledemon's Avatar](https://www.realm667.com/media/kunena/avatars/resized/size144/users/avatar209.png) Topic Author
- Pain Elemental
- ![Pain Elemental](https://www.realm667.com/media/kunena/ranks/rank_9_pain.png)

 Less More- Posts: 258
-
-
-

   9 years 10 months ago [\#4826](#4826) by doomedarchviledemon  Replied by *doomedarchviledemon* on topic *[Item activation question](https://www.realm667.com/forum/the-workshop/796-item-activation-question#4826 "I am trying to get a usable item to 'activate' when an enemy walks over it but cannot figure out how to make something 'activate' when an enemy makes contact. I have been looking at the Land Mine...")*

 Thank you both for the help. I now have the Bear Trap working as intended. There's only one more thing I'd like to make happen, if it's possible, before putting this up for submission. That is making the Active Trap stick to the enemy when triggered. As it is now it is possible for the player to shoot the enemy away from the trap when they should be completely immobilized until the trap breaks. Is there a way to make an inventory drop item stick to an enemy?

An updated version of the bear trap can be downloaded on the first post.

Please [Log in](https://www.realm667.com/component/users/login?return=aHR0cHM6Ly93d3cucmVhbG02NjcuY29tL2ZvcnVtL3RoZS13b3Jrc2hvcC83OTYtaXRlbS1hY3RpdmF0aW9uLXF1ZXN0aW9u&Itemid=2662) or [Create an account](https://www.realm667.com/component/users/registration?Itemid=2662) to join the conversation.

- **MagicWazard**
- ![MagicWazard's Avatar](https://www.realm667.com/media/kunena/avatars/resized/size144/users/avatar517.png)
- Moderator
- ![Moderator](https://www.realm667.com/media/kunena/ranks/rank_20_barrel.png)

 Less More- Posts: 808
-
-
-
-

   9 years 10 months ago - 9 years 10 months ago [\#4827](#4827) by MagicWazard  Replied by *MagicWazard* on topic *[Item activation question](https://www.realm667.com/forum/the-workshop/796-item-activation-question#4827 "I am trying to get a usable item to 'activate' when an enemy walks over it but cannot figure out how to make something 'activate' when an enemy makes contact. I have been looking at the Land Mine...")*

 So, do you want the trap to just stick to the monster, or for the monster to stick to the trap? It kind of sounds like the latter. If you just want the former, the Bio Pipebomb Launcher is able to have its projectiles stick to a monster, though I'm not sure if it's the most elegant example. It looks like it relies mostly upon [ A\_Fire](http://zdoom.org/wiki/A_Fire) to "stick" the projectile to the monster. As for the latter option, immobilizing the monster? Probably what you'll want to do is make the activated trap "solid" and "blocking" using [ A\_ChangeFlag](http://zdoom.org/wiki/A_ChangeFlag) during the lifespan of the bear trap, and hope that this "traps" the monster while it's active. You could probably also do some more convoluted stuff using an ACS script (or maybe the new [ A\_SetSpeed](http://zdoom.org/wiki/A_SetSpeed)) to change the Speed value of the monster to 0, but that would probably be more work than just making the trap solid so the monster is stuck in it.

 Last edit: 9 years 10 months ago by MagicWazard.

Please [Log in](https://www.realm667.com/component/users/login?return=aHR0cHM6Ly93d3cucmVhbG02NjcuY29tL2ZvcnVtL3RoZS13b3Jrc2hvcC83OTYtaXRlbS1hY3RpdmF0aW9uLXF1ZXN0aW9u&Itemid=2662) or [Create an account](https://www.realm667.com/component/users/registration?Itemid=2662) to join the conversation.

- **ozymandias81**
- ![ozymandias81's Avatar](https://www.realm667.com/media/kunena/avatars/resized/size144/users/avatar933.gif)
- Pain Elemental
- ![Pain Elemental](https://www.realm667.com/media/kunena/ranks/rank_9_pain.png)

 Less More- Posts: 258
-
-
-
- [](https://ozymandias81.wixsite.com/ozy81-site)
-

   9 years 10 months ago [\#4831](#4831) by ozymandias81  Replied by *ozymandias81* on topic *[Item activation question](https://www.realm667.com/forum/the-workshop/796-item-activation-question#4831 "I am trying to get a usable item to 'activate' when an enemy walks over it but cannot figure out how to make something 'activate' when an enemy makes contact. I have been looking at the Land Mine...")*

 I bet that *doomedarchviledemon* will need to check [ A\_Warp](http://zdoom.org/wiki/A_Warp) tricks.

Please [Log in](https://www.realm667.com/component/users/login?return=aHR0cHM6Ly93d3cucmVhbG02NjcuY29tL2ZvcnVtL3RoZS13b3Jrc2hvcC83OTYtaXRlbS1hY3RpdmF0aW9uLXF1ZXN0aW9u&Itemid=2662) or [Create an account](https://www.realm667.com/component/users/registration?Itemid=2662) to join the conversation.

[Powered by](https://www.realm667.com/forum/credits) [Kunena Forum](https://www.kunena.org)
