Jump to content

Spawn a NPC?


Recommended Posts

Ok

I'll try to explain but pardon my funny English, because I'm not native

 

this things is important :

- correctly installed obse 21 & CSE (you already did this)

- attach the script to charA (assumming charA is NPC base object)

- NPC BASE OBJECT is located in Object Window at CSE, NPC REFERENCE / Placed NPC is located in Cell View & Render Window, while DYNAMIC NPC ref is located only in certain savegame... (generated in-game)

- make sure charA is placed in world as Placed NPC

- my question is so why you need charB if you just can reuse charA, they are just the same NPC right ? so... my suggestion is you should change the script like this

scn charAScr
ref rf1
Begin OnDeath
;Once character A dies, same character is spawned.
Let rf1 := GetBaseObject
;I would like the spawned character to spawn at a map marker at the entrance to town (anvil)
AnvilMapMarkerNEW.PlaceAtMe rf1
End
Edited by lubronbrons
Link to comment
Share on other sites

The new character is of a different race and takes over the shop... so there are no more argonians in town. The mod purpose is to cleanse the town, LOL.

Plus I am curious how to do this. If I wanted the same character to just respawn then I could simply check the respawn box no?

Perhaps I need to wait 72hrs or something. I have your ondeath script and it doesnt work, the only difference i see is there is a begin gamemode block before it.

Link to comment
Share on other sites

ahh I see... now I get it, then the first script is right solution for that

could you post the full script here?

I already tested the script & it is working fine

maybe there is something in block GameMode that causing the script stop working

Link to comment
Share on other sites

quote : "If I wanted the same character to just respawn then I could simply check the respawn box no?"

>>> This ... is Yes and No

Yes

the NPC will respawn when the cell is got reset routine (by default this game setting is 72 hours = 3 days in-game)

NO !

because... if the NPC is die in exterior, and you frequently visit that exterior or even interior, that NPC will NEVER got respawn since everytime you visit that favorite cell, the reset hour in that cell got reset to 72!! This is heavenly annoying, usually happen in exterior


quote : "Does it matter the way char A dies? because I am using frenzy and he gets killed by the guards"

>>> nope, if OnDeath block don't have parameter whatever kills that NPC will trigger the script


hmm... I don't know what is wrong in your setup

here's my suggestion for new script



scn inkeeper1

short rent
short sleephour
short cleanup
short setup

begin GameMode
if rent
if setup
if GetPCMiscStat 20 != sleephour
set cleanup to 1
endif
else
set sleephour to GetPCMiscStat 20
set setup to 1
AnvilCountsArmsRentDoor.unlock
AnvilCountsArmsRentBed.SetOwnership
endif
if Cleanup
set rent to 0
set setup to 0
set cleanup to 0
AnvilCountsArmsRentDoor.SetOpenState 0
AnvilCountsArmsRentDoor.lock 30
AnvilCountsArmsRentBed.SetOwnership
endif
endif
End

Begin OnDeath
;Once character A dies, character B is spawned. I would like character b to spawn at a map marker at the entrance to town (anvil)
AnvilMapMarkerNEW.PlaceAtMe charB
End

Edited by lubronbrons
Link to comment
Share on other sites

Hooray it works! Thank you for your help!

 

Yeah what threw me off is on the left side it says "unmanaged" therefore I did not think I would have to put the checkbox in the mod manager as well, plus it was hidden and I had to scroll down, also it was selected in the main oblivion menu under data files. When I tried to summon char B with the console it said invalid object I was like wtf and then I had to put a vase just so it would show up it didnt, then I was like ok the mod is not even loading... duh

 

yeah your problem could be your mod is not even ACTUALLY LOADING AT ALL, LOL. No wonder I had so much trouble with it... In my defense tho it was a brand new mod.

 

i noticed that you have to use the old CS to make a new mod and cannot do it in the CSE

 

Thanks L for your help, your syntax is amazing

Link to comment
Share on other sites

  • Recently Browsing   0 members

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