Jump to content

[LE] NPC use script spells


Henrydatdao

Recommended Posts

Hello, I can't make NPC use a script spell. I don't know the problem is the script attached to the spell or the NPC just can't use script spells.

Here is the script, its a script to create an area effect around caster to push others away (just like Unrelenting Force Shout but its area effect)

 

Scriptname A0ShinraTenseiScript extends ActiveMagicEffect
explosion property explosion1 auto
int Property PushForce Auto
sound property sound1 auto
actor property player auto
spell property spell1 auto
Event OnEffectStart(actor Target, actor Caster)
Caster.PushActorAway(Target, PushForce)
EndEvent
Thank you
Link to comment
Share on other sites

1) Have you set the property "PushForce" to a value higher than Zero?
Keep in mind it should be a float, otherwise it will be cast from int to float.

2) Is it working for player? That means can the player use the scripted spell effect?

3) the wiki database: https://www.creationkit.com/index.php?title=PushActorAway_-_ObjectReference

4) look for next vanilla scripted effects (use TESVEdit (Skyrim 32-bit) or SSEdit (Skyrim 64-bit) or the CreationKit)

In case you have a vanilla spell duplicated, maybe some conditions in Spell or MGEF exist, which prevent that the spell is working as intended.

 

VoicePushEffectScript

 

Scriptname VoicePushEffectScript extends ActiveMagicEffect  

Event OnEffectStart(actor Target, actor Caster)
    Caster.PushActorAway(Target, PushForce)
EndEvent

int Property PushForce  Auto

; ---
;    DLC2WhirlwindDamageScript
;    DLC2CycloneEffectScript
;    DLC2LevitateScript
;    dunKatariahScimitarScript
;    MQ101VoicePushEffectScript
; ---

 


werewolfPushEffectScript

 

Scriptname werewolfPushEffectScript extends ActiveMagicEffect  

FLOAT Property PushForce AUTO  

;OBJECTREFERENCE PROPERTY launchPad AUTO
;BOOL PROPERTY pushLeft=FALSE AUTO
;BOOL PROPERTY pushRight=FALSE AUTO
;float transX=0.0
;float transZ=0.0


Event OnEffectStart(actor Target, actor Caster)

;    IF(pushLeft)
;        transX = ((target AS OBJECTREFERENCE).getPositionX()) + ((caster AS OBJECTREFERENCE).getPositionX())
;    ELSEIF(pushRight)
;        transX = ((target AS OBJECTREFERENCE).getPositionX()) + ((caster AS OBJECTREFERENCE).getPositionX())
;    ENDIF
    
    caster.PushActorAway(Target, PushForce)
    
    utility.wait(0.1)
    
    target.applyHavokImpulse(256, 0.0, 0.0, 25)
        
EndEvent

 

 

Edited by ReDragon2013
Link to comment
Share on other sites

  • Recently Browsing   0 members

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