SAC Posted January 31, 2021 Posted January 31, 2021 I have a cloak spell which attaches a magic effect to all NPCs around. What I want is to trigger an event on these surrounding NPCs when something else happens (specifically, to pacify them) The magic effect attached through the cloak contains this Scriptname SAC_03_hangingpersistence_monitoreff extends ActiveMagicEffect actor target event oneffectstart(actor aktarget, actor akcaster) target = aktarget RegisterForModEvent("SAC_player_combat_hang", "OnPlayerCombatHang") ; other stuff which works just fine endevent [...] Event OnPlayerCombatHang() debug.trace("sac_ received mod event OnPlayerCombatHang, attempting to pacify "+target) target.StopCombatAlarm() target.stopcombat() EndEvent Separately, there's a constant effect monitoring the player and triggering upon a condition (health < xx units) Scriptname sac_hang_player_on_lost_combat extends ActiveMagicEffect event oneffectstart(actor akcaster, actor aktarget) SendModEvent("SAC_player_combat_hang") endevent This fires just fine, but the sendmodevent doesn't do anything. I am obviously not using it right, but I don't know how to correct it TY
Fotogen Posted February 10, 2021 Posted February 10, 2021 You should use functions from ModEvent.psc script (part of SKSE) to send/catch custom mod events.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.