Jump to content

Script Help


darthbdaman

Recommended Posts

This just prints <no name> into the console once , and then doesn't do anything

 

It supposed to get all the armors in the game into a list. Filter the list into a separate list of only the power armor, and then go through that list, adding dt and dr, depending on the global vars set in the MCM

scn DTDRQuestScript

array_var Entry

ref rTemp

int iAR
int iDT

begin GameMode

	if (GetGameLoaded || GetGameRestarted)

		GetLoadedType DTDRArmors 24

		foreach Entry <- (GetListForms DTDRArmors)

    			let rTemp := *Entry

   		 	Print $rTemp 

			if rTemp IsPA
				
				if rTemp.IsInList DTDRPowerArmors
				else
					ListAddForm DTDRPowerArmors rTemp
				endif
			endif
		loop

	endif

	foreach Entry <- (GetListForms DTDRPowerArmors)

    		let rTemp := *Entry

   		Print $rTemp

		let iDT := ((GetArmorDT rTemp) * (DTDRDTMult))
		SetArmorDT iDT, rTemp

		let iAR := iDT  * DTDRDRPerc
		SetArmorAR iAR, rTemp

	loop

end
Link to comment
Share on other sites

scn DTDRQuestScript

array_var Entry

ref rTemp

int iAR
int iDT

begin GameMode

if GetGameRestarted

GetLoadedType DTDRArmors 24

foreach Entry <- (GetListForms DTDRArmors)

let rTemp := *Entry

Print $(LNGetName rTemp)

if IsPA rTemp

if ListGetFormIndex DTDRPowerArmors rTemp == -1
ListAddForm DTDRPowerArmors rTemp
endif
endif
loop

endif

foreach Entry <- (GetListForms DTDRPowerArmors)

let rTemp := *Entry

Print $(LNGetName rTemp)

let iDT := ((GetArmorDT rTemp) * (DTDRDTMult))
SetArmorDT iDT, rTemp

let iAR := iDT * DTDRDRPerc
SetArmorAR iAR, rTemp

loop

end

 

This should work.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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