Jump to content

Level Creature, Scripting & Controlling them


Recommended Posts

I want to script a level creature so that it only spawns actors when my script tells it to under certain conditions. Can a level creature or level list be scripted to spawn only when scripted to do so? I want use leveled creatures so that my mod can have variety.

scn RepReqQuest01a
Begin onAdd
if someQuest < 0
	if questNote01a.onAdd == 1
		if player.getDistance someLvllist < 500
set somelvllist.disable
elseif
	if someQuest > 0
		if player.getDistance someLvllist > 500
			set someLvllist.enable
endif
    endif
	endif
	    endif	
		endif

End
Link to comment
Share on other sites

it can (reference... https://cs.elderscrolls.com/index.php?title=Leveled_Creature)

All scripts and AI packages of NPCs are always overridden by the Creature Template. If the Creature Template is blank, the script and AI packages of any generated NPC will also be blank.

 

we could attach leveled record with a script

the example script that do this is leveled creature in last main quest, just before final boss Da*** beaten they will keep spawning, if we beat him the spawn will stop

I think you could take a look that script for good example (it will be easily spotted because only that leveled list in ALL vanilla LL that has script attached)

the script name is

MS94CreatureLLScript [sCPT:0000C73D]

MS48PlazaCreatureFinalLLScript [sCPT:0000C73C]

Link to comment
Share on other sites

unfortunately there is no easy way to do that

there is no OBSE syntax that can manipulate LL none chance on the fly, LL always loaded just after cell initialization

to switch on off LL maybe you need custom dll for that, but sadly not everybody can do that

so

let's try a workaround

you could do something similar turn on off LL spawn point with just simple syntax Kill and Disable (so the next time you enter that cell and got reset, the actor will be cleaned up)

I suggest that you take a look at that vanilla LL script

it seems that script do something that you want

here's the script from that MS94CreatureLLScript, when the quest reach certain stage it is switched OFF

ScriptName MS94CreatureLLScript

;script for respawning creature leveled lists in the southern plaza
begin OnLoad
	if getstage MS94 >= 80
		setdestroyed 1
	endif
end
Link to comment
Share on other sites

  • Recently Browsing   0 members

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