Jump to content

Quick Questions, Quick Answers


Mattiewagg

Recommended Posts

 

Hello. I'm looking for a script I can attach to NPC's that will make them despawn when you leave the cell/return to a cell.

Need this for a bandit den style player home I've made, want to allow you to take out the bandits and claim the place for yourself but don't want the bodies to linger. They seem to stay around forever for me.

 

 

Also looking for a simple pick up a note and 'go to location' kind of quest. Find lot of tutorials for quests that start at a npc and have you go kill someone, but nothing on just going to a location. (step by step would be nice as quests are my weak link) I know the script to attach to the note/book to trigger a quest.. it's making the go to part that I'm having issues with.

 

Thanks in advance.

There is the stock script: WIDeadBodyCleanupScript which is to be attached to UNIQUE actors. I'm not sure about non-unique actors.

 

Quests are not my strong point either, I'll let someone else answer that.

 

 

 

I've never gotten that script to work for me. It is set on a unique actor, however even setting it to 1 day the npcs exist forever. I've waited as long as a month and the bodies still linger.. and yes I am leaving and returning to the cell.

Edited by Taiine
Link to comment
Share on other sites

  • Replies 2.6k
  • Created
  • Last Reply

Top Posters In This Topic

Your NPCs could be persistent due to being aliased on a running quest or persistence lingers despite no longer being associated with a currently running quest. Another option then might be to create an isolated room in a new cell, place xMarkers for each unique npc in said room, then after their deaths have a script somewhere use MoveTo to move them from the bandit den to the isolated room.

Link to comment
Share on other sites

Your NPCs could be persistent due to being aliased on a running quest or persistence lingers despite no longer being associated with a currently running quest. Another option then might be to create an isolated room in a new cell, place xMarkers for each unique npc in said room, then after their deaths have a script somewhere use MoveTo to move them from the bandit den to the isolated room.

The NPC's I'm using are unique, made from scratch. There's no quest tied to them, and they use no template, though I'd have liked them to for lved reasons.. but I hear scrips can cause issues with lved lists. I've thought of adding a quest to kill them, but it's one part of the CK I haven't been able to really understand even with tutorials.. thus I wanted a script that would just remove them, and only have a simple 'go to location' thing, or make the marker for the place be added to your map on reading a note... but I've not found -anything- on any such and I can't recall quests that do it to check how it's done.

 

The move to may be worth a shot, but that isn't something I know how to really script. The move to would also have to be when the cel reloads if there dead, as I don't want them to just instantly poof once you kill them. Ugh, why is it the most simple of ideas end up being super complex?

Link to comment
Share on other sites

Hmm try this as a script on the actor themselves...

No properties needed, just put it on the actors and see how it works out.

ScriptName DisableMe_IAmDead Extends Actor

Bool IAmDisabled = false

Event OnCellDetach()
	If IAmDisabled == false
		actor myselfActor = (self as ObjectReference) as Actor
		If myselfActor.IsDead()
			myselfActor.Disable()
			IAmDisabled = true
		EndIf
	EndIf
EndEvent

I have no way of currently testing it. I'm confident it will compile, and hoping it will do the job. If someone comes along with better, then use theirs.

What should happen is after killing the bandits and exiting the area, they will disable. You can be safe and duplicate the event as OnCellAttach() that way if for some reason they did not disable when exiting, they will disable on entering.

 

And another spin on it should move them to a marker somewhere else (isolated room) and then disable them

ScriptName TeleportAndDisableMe_IAmDead Extends Actor

ObjectReference Property MyMarker Auto
{Marker to teleport to}

Bool IAmDisabled = false

Event OnCellAttach()
	If IAmDisabled == false
		actor myselfActor = (self as ObjectReference) as Actor
		If myselfActor.IsDead()
			myselfActor.MoveTo(MyMarker)
			myselfActor.Disable()
			IAmDisabled = true
		EndIf
	EndIf
EndEvent

I'm on the fence with whether OnCellDetach would be better or not. I'm afraid it may have issues due to unloading assets. On CellAttach() may be better but it could be possible that if a bandit died near the door that that first time back in, they'll see the bandit go poof.

Link to comment
Share on other sites

The DisableMe_IAmDead compiled just fine, but it still don't seem to work.

http://i.imgur.com/aH0wajA.png

Killed, left cell. waited an in game week, came back... body stil where it was left. and yes I am leaving the cell, not just going to another space with in the same cell. Tried adding it to the actor, the refrence in the cell, and even both at the same time.

 

I don't get what I am doing wrong, or if the scrips just arn't working in general.

 

The TeleportAndDisableMe_IAmDead script wont let me load as it says invalid doc strings from the { } marks.. unsure if that is just a comment or what not or if I was to do something with it.

 

...good news is I found a means to make a basic 'go to location' quest (or rather a trigger).. on picking up a note... it's adding a means that if the area was already found (or trigger crossed) the quest wouldn't start. @.x one step forward, several steps back.

 

Here I thought I was going to have a very basic and simple thing.. and it turns into an ongoing hastle.

I do appreciate the help though. far more then I've gotten elsewhere.

Link to comment
Share on other sites

Im really new to this forum stuff......just putting it ou there....

I dont know if im jn the right place

so....im playing skyrim....on like 8fps....its abit playable....but sucks

So can anyone please point me to some mods that atleast give me an extra 6fps?

Link to comment
Share on other sites

The DisableMe_IAmDead compiled just fine, but it still don't seem to work.

http://i.imgur.com/aH0wajA.png

Killed, left cell. waited an in game week, came back... body stil where it was left. and yes I am leaving the cell, not just going to another space with in the same cell. Tried adding it to the actor, the refrence in the cell, and even both at the same time.

 

I don't get what I am doing wrong, or if the scrips just arn't working in general.

 

The TeleportAndDisableMe_IAmDead script wont let me load as it says invalid doc strings from the { } marks.. unsure if that is just a comment or what not or if I was to do something with it.

 

...good news is I found a means to make a basic 'go to location' quest (or rather a trigger).. on picking up a note... it's adding a means that if the area was already found (or trigger crossed) the quest wouldn't start. @.x one step forward, several steps back.

 

Here I thought I was going to have a very basic and simple thing.. and it turns into an ongoing hastle.

I do appreciate the help though. far more then I've gotten elsewhere.

The { } is just a comment that is supposed to be a tool tip comment for the CK when highlighting the property in the property window, but I guess it only works if the comment is entered when creating the script from scratch inside the CK. You can delete the comment line.

 

Do you have any messages in the papyrus log when testing this scenario? Are your bandits tied to an enable parent? If so, disable won't work and that might explain a lot.

Link to comment
Share on other sites

Im really new to this forum stuff......just putting it ou there....

I dont know if im jn the right place

so....im playing skyrim....on like 8fps....its abit playable....but sucks

So can anyone please point me to some mods that atleast give me an extra 6fps?

Not exactly the thread for this type of thing. This is for questions in regards to making mods, not using them.

 

Still, check this guide out. It may be helpful and/or insightful. http://www.nexusmods.com/skyrim/mods/32363/?

Link to comment
Share on other sites

 

The DisableMe_IAmDead compiled just fine, but it still don't seem to work.

http://i.imgur.com/aH0wajA.png

Killed, left cell. waited an in game week, came back... body stil where it was left. and yes I am leaving the cell, not just going to another space with in the same cell. Tried adding it to the actor, the refrence in the cell, and even both at the same time.

 

I don't get what I am doing wrong, or if the scrips just arn't working in general.

 

The TeleportAndDisableMe_IAmDead script wont let me load as it says invalid doc strings from the { } marks.. unsure if that is just a comment or what not or if I was to do something with it.

 

...good news is I found a means to make a basic 'go to location' quest (or rather a trigger).. on picking up a note... it's adding a means that if the area was already found (or trigger crossed) the quest wouldn't start. @.x one step forward, several steps back.

 

Here I thought I was going to have a very basic and simple thing.. and it turns into an ongoing hastle.

I do appreciate the help though. far more then I've gotten elsewhere.

The { } is just a comment that is supposed to be a tool tip comment for the CK when highlighting the property in the property window, but I guess it only works if the comment is entered when creating the script from scratch inside the CK. You can delete the comment line.

 

Do you have any messages in the papyrus log when testing this scenario? Are your bandits tied to an enable parent? If so, disable won't work and that might explain a lot.

 

The NPC in question isn't tied to a single thing. They are really just a newly made npc with no ai packates or nada outside being a cowerd to make it easyer to kill them.

https://www.dropbox.com/s/c88qpg418prne5b/TIB%20-%20QuestTesting.esp?dl=0

Is the test bits I been working with and the npc I'm poking. coc aaquesttest

it has two cells, one main room where I been testing the start of my location quest, and the other with the npc and location objective. Yes they are two ceels, not one cel with two rooms.

 

Given that not a singl;e thing has worked on the npc, I'm sure I am just not adding it right, or some other force is in effect.

Edited by Taiine
Link to comment
Share on other sites

Your two cells are connected that means the game will keep stuff loaded from the one cell in case you want to go back. You have to exit to the outer world and possibly move far enough for the host world cell to be unloaded via ugrid settings. If your cell(s) are not connected to the outer world yet, try doing 'coc riverwood' after killing the bandits then coc back to your test cell.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...