get effect/getspelleffect both do NOT work on objects?

Post » Fri May 27, 2011 9:07 pm

So, I'm working thru the testing of the ideas phase of my trap replacement mod.
a little more info here:
http://www.gamesas.com/index.php?/topic/1143292-wip-trap-expansion-name-is-wip-also/

But I've kinda run into a roadblock. I was trying not to use MWSE cuz I can script ok but I haven't gotten into MWSE at all yet. But apparently using vanilla scripting you can only test for spell effects that affect an NPC or the player, not a container (haven't tried activator yet). I haven't gotten it to work yet but this does NOT mean that I'm going to give up.

Anyhow, the question I'm bringing up is this: Has anyone had any success testing a spell effect on a non NPC or PC target???

-EDIT- I think I figured out how to do this, so I'll come back and tell you if I got it or complain if I haven't figured it out ;)

ST
User avatar
bimsy
 
Posts: 3541
Joined: Wed Oct 11, 2006 3:04 pm

Post » Sat May 28, 2011 4:42 am

To my understanding, you can't test for them because spells don't effect anything but actors. At least, I've never seen a spell interact with a non-actor for any reason other than collision. That includes long-term spells; you'd expect a frost spell visual to show up if you catch a container within an area/time spell, but I don't remember seeing such behavior.

Non-actors don't have health or stats, which could explain why they aren't processed for spell.

From some of the lock-bash mods that have been made, the work-around is to use creatures or scripts to detect if the player is hitting, or near and facing, the object in question.
User avatar
Eileen Müller
 
Posts: 3366
Joined: Fri Apr 13, 2007 9:06 am

Post » Sat May 28, 2011 9:08 am

Yeah, I verified this myself. Using the scripts "getspelleffect", "geteffect", "hitOnME", or "HitAttemptOnMe"; they all ONLY work on NPCs or Creatures. It is for this reason that the Heart of Lorkhan is a creature not an activator. This will make the mod I have in mind more difficult to figure out. I may have to use MWSE.

Thanks for the reply, tho. Nice to have someone answer this kind of thing rather than leave you hanging.

ST
User avatar
Silencio
 
Posts: 3442
Joined: Sun Mar 18, 2007 11:30 pm


Return to III - Morrowind