Jump to content

Ref walking formlists


bwins95

Recommended Posts

Why would you need a Form List for?

Insert the below segment in the script you are using. Don't run it every frame. Use a timer, or some conditions as a way to trigger it.

ref	rObject


	set rObject to GetFirstRef 31 2 0
	Label 1
	if IsFormValid rObject
		if rObject.GetIsID Caps001
			rObject.PMS CapsShader
		endif
		set rObject to TeddyBear01
		set rObject to GetNextRef
		GoTo 1
	endif
Link to comment
Share on other sites

 

Why would you need a Form List for?

 

Insert the below segment in the script you are using. Don't run it every frame. Use a timer, or some conditions as a way to trigger it.

ref	rObject


	set rObject to GetFirstRef 31 2 0
	Label 1
	if IsFormValid rObject
		if rObject.GetIsID Caps001
			rObject.PMS CapsShader
		endif
		set rObject to TeddyBear01
		set rObject to GetNextRef
		GoTo 1
	endif

I was looking at this and thought that their might be a way to use formlist for single items.

 

Unfortunately it doesn't seem to work.

the if rCurrentRef.GetIsID Caps001 line seems to be the problem.

 

This is caps part of the script. it is applied with OnEquip on a pair of glasses.

 

set rCurrentRef to GetFirstRef 31 2 0

Label 11

if IsFormValid rCurrentRef

if rCurrentRef.GetIsID Caps001

if aaaaGlowingItemsscaps == 1

if aaaaGlowingItemsscapsGreen== 1

rCurrentRef.PlayMagicShaderVisuals aaaaGlowingItemsShaderGreen

elseif aaaaGlowingItemsscapsRed == 1

rCurrentRef.PlayMagicShaderVisuals aaaaGlowingItemsShaderRed

elseif aaaaGlowingItemsscapsBlue == 1

rCurrentRef.PlayMagicShaderVisuals aaaaGlowingItemsShaderBlue

elseif aaaaGlowingItemsscapsWhite == 1

rCurrentRef.PlayMagicShaderVisuals aaaaGlowingItemsShaderWhite

elseif aaaaGlowingItemsscapsYellow == 1

rCurrentRef.PlayMagicShaderVisuals aaaaGlowingItemsShaderYellow

elseif aaaaGlowingItemsscapsPink == 1

rCurrentRef.PlayMagicShaderVisuals aaaaGlowingItemsShaderPink

elseif aaaaGlowingItemsscapsPurple == 1

rCurrentRef.PlayMagicShaderVisuals aaaaGlowingItemsShaderPurple

elseif aaaaGlowingItemsscaps == 0

endif

set rCurrentRef to TeddyBear01

set rCurrentRef to GetNextRef

GoTo 11

endif

endif

endif

 

 

Link to comment
Share on other sites

I don't see why it shouldn't work. You are doing the refwalk in a gamemode block, right? Not in the On equip block.


A formlist would work like this:


if rCurrentRef.IsInList MyFormList

Link to comment
Share on other sites

 

I don't see why it shouldn't work. You are doing the refwalk in a gamemode block, right? Not in the On equip block.
A formlist would work like this:
if rCurrentRef.IsInList MyFormList

 

I've attached my full script. the ref walking happens in the begin onequip player block. I did it this way because it was the first thing that worked.

Edited by bwins95
Link to comment
Share on other sites

  • Recently Browsing   0 members

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