Compiles but doesn't work

Post » Mon Aug 05, 2013 10:11 am

Hi,

What I'm trying to achieve is the following: the player hits an actor, then such actor gets disabled. This is the first step of a 'defensive teleportation' script that I wish to make.

Code (it compiles fine):

Scriptname aasmtDefensiveTeleport extends activemagiceffect  {test}Event OnEffectStart(Actor akTarget, Actor akCaster)	akTarget.Disable()EndEvent

This code is attached to a Magic Effect of archetype 'Script', casting type 'Fire and Forget', and delivery 'contact'

The magic effect, in turn, is attached to a spell which also contains another 2 magic effects (that work as intended)

The spell, finally, is attached to a perk with 'Apply Combat Hit Spell' as the entry point.

I imagined that I should be able to deliver the script to the target by hitting him (since I use 'Apply Combat Hit Spell') but the target doesn't get disabled on hit so something must be wrong.

Any help appreciated!

User avatar
Mariana
 
Posts: 3426
Joined: Mon Jun 12, 2006 9:39 pm

Post » Mon Aug 05, 2013 3:48 am

What are you targeting? Some NPCs, such guards, have enable parents and can't be disabled. Put a debug message in there (ex: debug.notification(akTarget+"was just hit")) to make sure the script is firing.

User avatar
Allison C
 
Posts: 3369
Joined: Mon Dec 18, 2006 11:02 am

Post » Mon Aug 05, 2013 1:52 am

I'm targetting actors who have a spell in his left-hand (that is, mages or spellswords). Will try the debug notification, thank you for that.

Edit: ok, it seems that the script is not firing. There must be a problem in the delivery then.

User avatar
Shelby McDonald
 
Posts: 3497
Joined: Sat Jan 13, 2007 2:29 pm


Return to V - Skyrim