Jump to content

Custom Script Effects


Recommended Posts

I'll try some more test Scripts soon. For now I still need on that will change grips for any melee weapon type, because the current version can only do blades and its a 1way spell, with having to equip a different spell to turn it back. So for this version, lets call it Alpha2 lets try to:

Cast Spell

Equipped & Drawn weapon changes grips.

And you can cast the same spell to change it back.

Some bugs like NPC's changing grips as well shouldn't be TOO big of an issue to a player, because eventually you'd most likely use uncommon weapons (unique etc) Though I have not tested if a player enchanted weapon will still make an NPC's change grips. I hope not.

Link to comment
Share on other sites

  • 11 months later...

UNTESTED:

 

First, I made a UDF to get an actor's exact equipped weapon. This needs to be an Object script:

scn FnGetEquippedWeaponRef

;returns the passed actor's currently equipped weapon as an inventory reference

ref rActorRef

ref rWeap
array_var aEntry

begin Function { rActorRef }

	let rWeap := rActorRef.GetEquippedObject 16

	if (rWeap)

		foreach (aEntry <- GetInvRefsForItem rWeap)

			let rWeap := *aEntry

			if (rWeap.IsEquipped)
				break
			endif

		loop

	endif

	let aEntry := ar_Null

	SetFunctionValue rWeap

end

 

Sorry for the late bump, but I figured I'd chime in with a fix: I've had reason to make use of a very slightly modified version of this function, only to find it didn't work, and that's because the line

foreach (aEntry <- GetInvRefsForItem rWeap)

needs to be replaced with

foreach (aEntry <- rActorRef.GetInvRefsForItem rWeap)

No shade, it's better code than I could have written myself; just trying to help anyone who is scouring the internet for solutions like I was. Thanks a million for the help.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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