Hit detection for an ObjectReference?

Post » Mon Jun 18, 2012 9:16 pm

Seems Papyrus is determined it only wants to allow akTarget to be an actor. Is there any way to enable this on refs?
User avatar
Lucky Boy
 
Posts: 3378
Joined: Wed Jun 06, 2007 6:26 pm

Post » Mon Jun 18, 2012 7:52 pm

Not really sure what you mean here... I've tested it, and http://www.creationkit.com/OnHit_-_ObjectReference will work on non-http://www.creationkit.com/Actor_Script http://www.creationkit.com/ObjectReference_Script%22]ObjectReferences[/url].

Cipscis
User avatar
Scared humanity
 
Posts: 3470
Joined: Tue Oct 16, 2007 3:41 am

Post » Tue Jun 19, 2012 2:02 am

I'm speaking more for spell effects, you can use akTarget on effect scripts but it has to be an actor. Basically I'd like a way to cast a spell at an object, and the spell to react to the object without attaching a script to the reference itself, which doesn't seem doable :(
User avatar
Causon-Chambers
 
Posts: 3503
Joined: Sun Oct 15, 2006 11:47 pm

Post » Tue Jun 19, 2012 7:58 am

As far as I'm aware, effects are only actually run on http://www.creationkit.com/Actor_Script, although for some objects (I believe only the ones under "World Objects" or whatever it's called in the Creation Kit - not inventory items) you can detect the event with http://www.creationkit.com/OnMagicEffectApply_-_ObjectReference, but that needs to be done from the "other end" - i.e. the reference being hit.

However, if you want to run a magic effect on something that's not an Actor, I don't think there's any other method. If anyone knows of one, I would absolutely love to hear it, as the method I've needed to do for my (currently not clean enough to release) cook meat with fire spells mod is very complicated in order to get around this.

In order to do something when meat is hit by a spell, I've had to use a quest script to swap all meat for almost identical http://www.creationkit.com/Activator_Script (that add the default http://www.creationkit.com/Potion_Script object to the player's inventory when activated) that have a script which detects the spell.

Still a couple of issues with http://www.creationkit.com/PlaceAtMe_-_ObjectReference, and uninstalling will destroy all meat that the player has ever seen, but aside from that it works at least.

Cipscis
User avatar
Lyndsey Bird
 
Posts: 3539
Joined: Sun Oct 22, 2006 2:57 am


Return to V - Skyrim