Delete command in a script ( markfordelete wont compile )

Post » Sun Oct 27, 2013 7:23 am

Quick question. I've modified a script that makes a corpse disintegrate by adding in the delete command at the end if it. So far everything seems to work. The corpse ash pile disappears after a cell load.

I was under the impression that markfordelete was the proper way to remove objects / NPC corpses from the game. Markfordelete will not compile though.

So is the delete command okay to use and considered a safe way to remove corpses?
User avatar
Katharine Newton
 
Posts: 3318
Joined: Tue Jun 13, 2006 12:33 pm

Post » Sun Oct 27, 2013 8:26 am

I thought MarkForDelete was a console command?

If it can be used in a script, you probably have the syntax wrong. What error messages do you get when you try to compile it?
User avatar
Anna Watts
 
Posts: 3476
Joined: Sat Jun 17, 2006 8:31 pm

Post » Sun Oct 27, 2013 6:25 am

Yeah MarkForDelete is a console command. Delete() is papyrus. Post your script. The proper way to delete something would be like...

kActor.Disable()kActor.Delete()kActor = None

Keep in mind that you can only delete objects created in game. Actors created in the CK cannot be deleted. You may want something like kActor.SetCriticalStage(4) to clean up the body which then should have it reset properly on a cell reset.

Also many unique actors move to a "morgue" cell when they're cleaned up after death.

User avatar
lauren cleaves
 
Posts: 3307
Joined: Tue Aug 15, 2006 8:35 am

Post » Sun Oct 27, 2013 2:56 am

it's just a console command now, but up to fallout nv, there was no actual "delete" and you'd use this to have stuff deleted on next cell reset

User avatar
Anthony Rand
 
Posts: 3439
Joined: Wed May 09, 2007 5:02 am

Post » Sun Oct 27, 2013 1:52 am

that's totally new to me, does this also concern _objects_ created in game? like, say, triggers, misc items etc...?

cuz i delete these like crazy whenever i don't need them anymore... :-)

User avatar
aisha jamil
 
Posts: 3436
Joined: Sun Jul 02, 2006 11:54 am

Post » Sun Oct 27, 2013 8:14 am

Does that include game created objects who's base object have scripts with properties assigned also?

User avatar
Charlotte Lloyd-Jones
 
Posts: 3345
Joined: Fri Jun 30, 2006 4:53 pm


Return to V - Skyrim