Jump to content

Trapping Souls


Scudmarx

Recommended Posts

I am making some modifications to let me play an archer/mage combo that can 'deliver' spells through arrows. The basics of it revolve around a script-effect arrow enchant that detects the player's active spell and uses an activator to cast that spell on arrow-hit...

 

; Script casts active spell on target struck by Arcane Arrow

scriptname aaSamArrowScript

ref source
ref spell
ref victim
short school
int cost

begin ScriptEffectStart
set source to aaSamArrowSource						; Identify the dummy activator object
set spell to GetPlayerSpell							; Identify the player's active spell
set victim to This
set school to GetSpellSchool spell						; Identify spell's school for skill-up
set cost to player.GetSpellMagickaCost spell				; Record the spell's magicka cost

if victim.IsActor && (player.getav Magicka >= cost)			; Abort if you can't cast the spell

	if school == 0								; Award skill up for casting the spell
		IncrementPlayerSkillUse Alteration 1 1
	elseif school == 1
  		IncrementPlayerSkillUse Conjuration	1 1
	elseif school == 2
		IncrementPlayerSkillUse Destruction 1 1
	elseif school == 3
		IncrementPlayerSkillUse Illusion 1 1
	elseif school == 4
		IncrementPlayerSkillUse Mysticism 1 1
	elseif school == 5
		IncrementPlayerSkillUse Restoration 1 1
	endif	

	;if (GetNthEffectItemRange spell 0) > 0				; Use Dummy Activator to cast spell point-blank
		source.MoveTo victim 0, 0, 10
		source.Cast spell victim
	;else
	;	SetNthEffectItemRange 1 spell 0
	;	source.MoveTo victim 0, 0, 10
	;	source.Cast spell victim
	;	SetNthEffectItemRange 0 spell 0
	;endif
	
	set cost to -1 * cost
	player.modAV2 Magicka cost						; Pay the magicka cost for the spell
endif
end

 

 

It's a work in progress and there are some bits I could sure use some help with if you're willing! You can probably tell I'm not very experienced at this scripting thing.

 

Firstly I'm wondering if there's a way to properly soul trap the victim - the activator actually casts the spell so the player doesn't get any souls. Any ideas?

Link to comment
Share on other sites

Well, maybe you could somehow modify it so the bow temporarily gains Soul Trap on Strike during the shot? It'd be some complicated scripting, though...

 

The mod sounds really cool though. One of the characters I'm writing for was going to work on a concept similar to this, so I hope the mod comes out so I can play as her.

 

(Another thing she does is dual-wield bows by using Telekinesis to pull the strings back, but that'd probably be even harder to do. :P)

Link to comment
Share on other sites

  • Recently Browsing   0 members

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