OBSE Doubts about "SetActorRespawns"

Post » Mon Dec 05, 2011 4:36 pm

Hope someone can help me this time. I'm new on scripting with OBSE, eventually, the OBSE functions will work in the CS automatically or will I need to set something to recognize them?

I want to create a spell that can toggle the Respawn Flag on NPCs. For now, for my testing purposes, the tag would switch between NoRespawn/IsEssential and Respawn/NoEssential. To avoid problems with NPCs for Level lists, there would be a fork to recognize if the NPC has "No Low Level Processing", if the flag is marked, the spell won't work. I picked a script from one of those mods that adds a spell that resurrects NPCs and my script looks like this:

begin ScriptEffectStartref myselfset myself to GetSelfif (Myself.HasLowLevelProcessing == 0)		If (Myself.IsEssential == 1)			Myself.SetEssential to 0			Myself.SetActorRespawns to 1		Elseif (Myself.IsEssential == 0)			Myself.SetEssential to 1			Myself.SetActorRespawns to 0		Endif	else 		MessageBox "This Actor may belong to Level Lists and won't be toggled"	endifend



The CS also didn't accept this script. My OBSE is 18, I read their documentation quickly and I didn't find those commands on "New Features" chapter.
If I'm posting this question in the wrong place or, if there is another forum more appropriate to ask this, please, let me know. Thank you for your attention.

EDIT: Added code tags.
User avatar
R.I.P
 
Posts: 3370
Joined: Sat Dec 01, 2007 8:11 pm

Post » Mon Dec 05, 2011 6:05 pm

Hope someone can help me this time. I'm new on scripting with OBSE, eventually, the OBSE functions will work in the CS automatically or will I need to set something to recognize them?

I want to create a spell that can toggle the Respawn Flag on NPCs. For now, for my testing purposes, the tag would switch between NoRespawn/IsEssential and Respawn/NoEssential. To avoid problems with NPCs for Level lists, there would be a fork to recognize if the NPC has "No Low Level Processing", if the flag is marked, the spell won't work. I picked a script from one of those mods that adds a spell that resurrects NPCs and my script looks like this:




The CS also didn't accept this script. My OBSE is 18, I read their documentation quickly and I didn't find those commands on "New Features" chapter.
If I'm posting this question in the wrong place or, if there is another forum more appropriate to ask this, please, let me know. Thank you for your attention.
Use code tags !!!
But really you are very confused - read the cs wiki - your syntax of the functions is completely wrong :nono:
scn maMyMagicEffectScriptref myselfbegin ScriptEffectStartset myself to GetSelfif (Myself.HasLowLevelProcessing == 0)	If ( Myself.IsEssential )		SetEssential Myself 0		Myself.SetActorRespawns 1	Else		SetEssential Myself 1		Myself.SetActorRespawns 0	Endifelse	MessageBox "This Actor may belong to Level Lists and won't be toggled"	; low level processing has NOTHING to do with leveled lists !!!endifend
Moreover I do not think you understand what essential, low level processing and respawns mean or their relationship :rolleyes:
Read the wiki
User avatar
Star Dunkels Macmillan
 
Posts: 3421
Joined: Thu Aug 31, 2006 4:00 pm

Post » Mon Dec 05, 2011 8:48 pm

Thank you, utumno, i'll keep on tracking down what I want to learn there.
User avatar
HARDHEAD
 
Posts: 3499
Joined: Sun Aug 19, 2007 5:49 am

Post » Mon Dec 05, 2011 7:17 am

Look what I found!
(from http://cs.elderscrolls.com/constwiki/index.php/Leveled_Creature)

A Leveled Creature list cannot contain any NPCs who do not have the "No low level processing" flag checked.


I think, "No low level processing" has something to do with Leveled Creature lists, not everything since....

If checked, the NPC will not run scripts or AI packages unless the player is within the same cell as the NPC in question.

(from http://cs.elderscrolls.com/constwiki/index.php/Category:NPC)
User avatar
Mizz.Jayy
 
Posts: 3483
Joined: Sat Mar 03, 2007 5:56 pm

Post » Mon Dec 05, 2011 2:52 pm

A Leveled Creature list cannot contain any NPCs who do not have the "No low level processing" flag checked.
Yes - meaning when HasLowLevelProcessing is true then it cannot be in a leveled list - that's why low level processing has nothing to do with lvld lists.
When someone does not have LowLevelProcessing can or can't be in a leveled list - but in your script you do the exact opposite
should be:
scn maMyMagicEffectScriptref myselfbegin ScriptEffectStartset myself to GetSelfif ( Myself.HasLowLevelProcessing )	; so "NO low level proc" is NOT checked	If ( Myself.IsEssential )		SetEssential Myself 0		Myself.SetActorRespawns 1	Else		SetEssential Myself 1		Myself.SetActorRespawns 0	Endifelse	MessageBox "This Actor may belong to Level Lists and won't be toggled"	; low level processing has NOTHING to do with leveled lists - meaning when one *has* LLP CANNOT be In a leveld list - but current actor has NOT LLPendifend


EDIT : HasLowLevelProcessing != HasNoLowLevelProcessingFlagChecked :)
User avatar
Gemma Archer
 
Posts: 3492
Joined: Sun Jul 16, 2006 12:02 am

Post » Mon Dec 05, 2011 1:39 pm

Ahhh, now it was properly explained. Thank you a lot! ^_^
User avatar
Ellie English
 
Posts: 3457
Joined: Tue Jul 11, 2006 4:47 pm


Return to IV - Oblivion