spell vs misc

Post » Tue Sep 23, 2014 7:09 pm

i'd like a couple of specific "misc" items (~5 dif) to run a script when they're hit by a spell.

i'm encountering some obstacles there though, and spells are one of my weak spots (yet), so i'm hoping for some validation & advice:

i don't want to put OnHit-scripts directly on the base objects (all vanilla),

magic effect's akTarget is actor though.

so now: do i really need to constantly keep running helper quests to find items of my types so i can put them in aliasses to put my OnHit stuff on?

or is there (hopefully) any more efficient ways to get my script onto that misc items and have my spell trigger it?

User avatar
Frank Firefly
 
Posts: 3429
Joined: Sun Aug 19, 2007 9:34 am

Post » Wed Sep 24, 2014 5:00 am

I think the helper quest/alias thing might be required if you really want to catch every instance of this happening. However, you could also potentially use http://www.creationkit.com/OnCrosshairRefChange_-_Form to detect when the player is looking at your objects before they cast the spell. This would be a lot simpler, but it has the downfall of not always catching every spell hit if the player didn't look directly at the item before casting (like if they cast a fireball a few feet away from it)

User avatar
Steven Hardman
 
Posts: 3323
Joined: Sun Jun 10, 2007 5:12 pm

Post » Wed Sep 24, 2014 12:02 am

phew... that's about ~5 unique items (the moth jars. planned mod name: "bee free". do i need to elaborate on what it's supposed to do...? :-))

...and keep scanning all of skyrim every 2 steps just for these, dunno... that's just like shooting mosquitos with cruise missiles...

(and that skse-function sounds neat, but i rather stick with vanilla)

guess i'll rather go back to popping up a menu when they're picked up then (which i wanted to avoid in the first place, i find popups pretty game breaking)

...or if anybody knows of such a mod existing already, i'll maybe just leave it (plenty other wip's and updates to do anyway)

btw, just discovered your thread about how you detect player in water with that ability thingie - cool concept, maybe i can come up with something alongside this...

User avatar
Lew.p
 
Posts: 3430
Joined: Thu Jun 07, 2007 5:31 pm


Return to V - Skyrim