Jump to content

New Trap Mesh - Looking for Help


Recommended Posts

I'm trying to make a new trap.

I have used the BearTrap Nif as the base, Removed the bear trap objects including the animations left the trigger box then added my own object.

In the CK is show up as expected with the trigger box viable... But...
in game I can't seem to capture any events.

 

In the attached script I have the following...

 


event OnTriggerEnter(objectReference TriggerRef)
Debug.Notification("OnTriggered....")
endEvent

 

event onTrigger(objectReference triggerRef)
Debug.Notification("Triggered....")
endEvent

 

event onActivate(objectReference activateRef)
Debug.Notification("Activated....")
endEvent

 

Event OnTrapHit(ObjectReference akTarget, float afXVel, float afYVel, float afZVel, float afXPos, float afYPos, float afZPos, int aeMaterial, bool abInitialHit, int aeMotionType)
Debug.Notification("Trap hit....")
endEvent

 

Event OnTrapHitStart(ObjectReference akTarget, Float afXVel, Float afYVel, Float afZVel, Float afXPos, Float afYPos, Float afZPos, Int aeMaterial, Bool abInitialHit, Int aeMotionType)
Debug.Notification("Trap hit start....")
endEvent

 

 

If I activate the item (E) then the "Activated...." is triggered, but none of the others.

What I'm trying to do is detect when the player just collides with the item. Hence the hard coded trigger box in the nif.

I'm hoping it's just something simple I've missed like a setting in the nif.

Any ideas anyone ?

Link to comment
Share on other sites

Just use a defaultActivateSelfTRIG, it sends activate events the second you enter this trigger. Then have whatever trap object you're using have the defaultActivateSelfTRIG as it's activate parent. In the mesh, the only thing you need to delete is the art model. Leave everything else intact, especially the event, controller and animation data as the game needs them to activate the trap.

Link to comment
Share on other sites

I'm not sure but I think you are suggesting a separate trigger box for each trap linked to the trap ?

The reason for using the inbuilt trigger box was so as not to have to do that. I plan to have possibly hundreds of these traps.

 

I will however go have another look at what I deleted from the original trap mesh I used... it's quite probable I removed more than I should :D

 

thanks

Link to comment
Share on other sites

Hmm... maybe I'm not understanding what you are meaning :(

 

What I'm trying to end up with is a mesh with a built in trigger box (like the bear trap) but with my own art model that I can detect in game when the Player walks on/through the trigger.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...