"Start as dead" not an option - how to kill?

Post » Sat Nov 17, 2012 9:45 pm

Hey there.

I'm kinda noobish to the hole scripting world in general and this is not just for CK. (;
Sitting here creating a mod I've come to learn that the "Start as dead" can't be checked in a cell where the "Don't havoc settle" is active either.
Now my question goes:
How the heck do I spawn my NPCs as dead?
I've looked over the Official CK Wiki, but since I have no clue how I script in the first place I really need a "back-to-basic" walk through for this.

Thanks in advance.

Regards.
User avatar
Chloe Yarnall
 
Posts: 3461
Joined: Sun Oct 08, 2006 3:26 am

Post » Sat Nov 17, 2012 10:52 pm

Hey there.

I'm kinda noobish to the hole scripting world in general and this is not just for CK. (;
Sitting here creating a mod I've come to learn that the "Start as dead" can't be checked in a cell where the "Don't havoc settle" is active either.
Now my question goes:
How the heck do I spawn my NPCs as dead?
I've looked over the Official CK Wiki, but since I have no clue how I script in the first place I really need a "back-to-basic" walk through for this.

Thanks in advance.

Regards.

There's a very recent thread (in the last day or two) on this very topic... check this link out: http://www.gamesas.com/index.php?showtopic=1400713
User avatar
Karen anwyn Green
 
Posts: 3448
Joined: Thu Jun 15, 2006 4:26 pm

Post » Sun Nov 18, 2012 5:20 am

Thanks for the reply - but either way I'm unable to understand the thread.
As I wrote: I've NEVER done this before and I just need to have the NPCs/mobs to be killed, so that a sewer can have some dead rats and a skeleton laying around.

And all I'm really just looking for is a script that kills an NPC/mob on cell load.
User avatar
Gen Daley
 
Posts: 3315
Joined: Sat Jul 08, 2006 3:36 pm

Post » Sun Nov 18, 2012 6:41 am

Something like this attached to the actor should do the trick.

Scriptname KillSelfOnLoad extends Actor  {DIE! DIE! DIE!}EVENT onLoad()    If !Self.IsDead()        Self.Kill(Self)    EndIFendEVENTEVENT onCellAttach()    If !Self.IsDead()   	 Self.Kill(Self)    EndIfendEVENT

Probably a little redundant, but I want to make sure they are dead and sometimes either onLoad or onCellAttach won't fire. Note that this method will probably result in a bunch of death-cries when the player first enters the cell.
User avatar
CHARLODDE
 
Posts: 3408
Joined: Mon Apr 23, 2007 5:33 pm

Post » Sun Nov 18, 2012 2:33 am

I'll give it a go in the very near future.
Thanks.

And no problem with the death cries since the rats and skeletons isn't near the entrance of the dungeon. (;

EDIT:
Could you maybe change it into a OnCellLoad?
User avatar
lexy
 
Posts: 3439
Joined: Tue Jul 11, 2006 6:37 pm

Post » Sat Nov 17, 2012 9:33 pm

Give it a try, see what works for you!
User avatar
Kortknee Bell
 
Posts: 3345
Joined: Tue Jan 30, 2007 5:05 pm

Post » Sat Nov 17, 2012 11:50 pm

I might be a complete noob or just misunderstood this hole script thing!

I've added a new script to the mob as follows:

Name: KillSelfOnLoad
Extends: Actor
No check
No check
Documentation String:
{EVENT onLoad()    If !Self.IsDead()	    Self.Kill(Self)    EndIFendEVENTEVENT onCellAttach()    If !Self.IsDead()		 Self.Kill(Self)    EndIfendEVENTEVENT onCellLoad()    If !Self.IsDead()		 Self.Kill(Self)    EndIfendEVENT}

And when I add it and want to edit the source it is as follows:
Scriptname KillSelfOnLoad extends Actor  {EVENT onLoad()    If !Self.IsDead()	    Self.Kill(Self)    EndIFendEVENTEVENT onCellAttach()    If !Self.IsDead()		 Self.Kill(Self)    EndIfendEVENTEVENT onCellLoad()    If !Self.IsDead()		 Self.Kill(Self)    EndIfendEVENT}

No errors is given - what so ever - but the mob/NPC lives on...
User avatar
katie TWAVA
 
Posts: 3452
Joined: Tue Jul 04, 2006 3:32 am

Post » Sat Nov 17, 2012 10:25 pm

See those curly braces at the beginning and the end? That is making the entire script the documentation string. There's no actual code being executed. Edit the script, remove the curly braces, and save. Then try it again.
User avatar
Eibe Novy
 
Posts: 3510
Joined: Fri Apr 27, 2007 1:32 am

Post » Sat Nov 17, 2012 10:59 pm

Cheers man...
This have been driving me insane!
Thanks SO much! xD
User avatar
Bloomer
 
Posts: 3435
Joined: Sun May 27, 2007 9:23 pm

Post » Sun Nov 18, 2012 7:55 am

Why not just enable the Havok physics settle? Worked fine for me last night.
User avatar
Tha King o Geekz
 
Posts: 3556
Joined: Mon May 07, 2007 9:14 pm

Post » Sun Nov 18, 2012 9:37 am

Use "Don't Havoc" and "Start as Dead" in the same cell and the "Don't Havoc" wont work.
User avatar
Izzy Coleman
 
Posts: 3336
Joined: Tue Jun 20, 2006 3:34 am


Return to V - Skyrim