Jump to content

A Few JIP Actor Functions Not Working


Phrozin

Recommended Posts

I made a script to randomize an NPC's template, race, sex, eyes, hair, etc. I can get most of it to work, except a few JIP actor functions: LNSetActorTemplate, SetActorTemplateFlag, SetRace

I have form lists with all of the male and female presets to use for model/animation templates. None of the aforementioned functions seem to do anything at all.

scn 0CultistRandomizerScript

ref rActor
int iSex
int iTemplate
ref rTemplate
int iRace
ref rRace
int iEye
ref rEye
int iHair
ref rHair
int iHairColor
int iHeadPartYN
int iHeadPart
ref rHeadPart
int iStop

Begin onLoad

if iStop == 0

	set rActor to GetSelf

	set iSex to Rand 1, 2
	set iRace to Rand 0, 4
	set iEye to Rand 0, 4

	let rRace := ListGetNthForm 0CultistRaceList iRace
	let rEye := ListGetNthForm 0CultistEyeList iEye
	SetRace rActor rRace

;Sex specific area start
	if iSex == 2
		rActor.SexChange Female
		set iTemplate to Rand 0, 39
		let rTemplate := ListGetNthForm 0PresetWomenList iTemplate
		rActor.LNSetActorTemplate rTemplate
		rActor.SetActorTemplateFlag 64 1 rTemplate
		set iHair to Rand 0, 23
		let rHair := ListGetNthForm 0CultistFHairList iHair

	else
		set iHeadpartYN to Rand 1, 2
		set iTemplate to Rand 0, 39
		let rTemplate := ListGetNthForm 0PresetMenList iTemplate
		rActor.LNSetActorTemplate rTemplate
		rActor.SetActorTemplateFlag 64 1 rTemplate
		set iHair to Rand 0, 17
		let rHair := ListGetNthForm 0CultistMHairList iHair
		if iHeadPartYN == 1
			set iHeadPart to Rand 0, 37
			let rHeadPart := ListGetNthForm 0CultistMaleHeadParts iHeadpart
			GenericAddForm 10, rActor, rHeadpart, -2
		endif
		
	endif
;Sex specific stuff end

	rActor.SetHair rHair
	rActor.SetEyes rEye
	rActor.Update3D
	set iStop to 1

endif

end

 

Edited by Phrozin
Link to comment
Share on other sites

  • Recently Browsing   0 members

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