Jump to content

How to dismember corpses in GECK?


Anubis4545

Recommended Posts

So, 1 million years later, I have a question about this post. Maybe I just need to learn how to script but I figured I'd copy from here to get me started and this is what I've come up with...

scn DeathDismemberScript

short doOnce
ref thisRef


Begin OnLoad

	if doOnce == 0
		set thisRef to getSelf
		KillActor DismemberLimb: 1 CauseOfDeath: 0
		
		set doOnce to 1
	endif

End

According to the wiki, DismemberLimb is the correct is the correct syntax for which limb to be dismembered and the integer, 1, represents which limb. In this case it's the head.
CausOfDeath should also be the correct syntax for the cause of death with the integer, 0, representing which cause. In this case, the cause is an explosion.

The error that I'm receiving is

"SCRIPTS: Script 'DeathDismemberScript', line 11
Item 'DismemberLimb' not found for parameter Actor (optional)."

 

Thus, it will not save my script. Any ideas as to what the problem may be?

Link to comment
Share on other sites

A couple of things. When putting optional parameters you only put the parameter itself. Also, you did not put the thisRef you set. I'm a hack at scripting, but that should work.

scn DeathDismemberScript

short doOnce
ref thisRef

Begin OnLoad
	if doOnce == 0
		set thisRef to getSelf
		KillActor thisRef 1 0
		set doOnce to 1
	endif

End
Link to comment
Share on other sites

It still isn't working. I appreciate your help. I'm just going to have to actually learn to use the scripting tool better. I've been programming in other languages for years just have not done any modding before this week so it's all very new to me. I'll tackle these steps one at a time.

Link to comment
Share on other sites

Let me tell you this much imformation about the GECK. Scripting itself is not so much important as knowing when to use the script and what scripts work when and where. You take a good script and it should work and it does not. Usually the reason is because where and how it is being used. Often times you find yourself having to get creative in how you implement the script in the GECK. In other words often it is not making the script itself work as much as adjusting your environment to make the script work. Sometimes the real annoying part is when you make one tiny change that should not make a difference and boom it starts working. Good luck and feel free to tap into my limited knowledge on scripting. :smile:

Link to comment
Share on other sites

Jazziparis, you saved the day. With the original code of Begin OnLoad, I was getting an error in game that wouldn't let me use the coc command to enter my mod. Something about the script but all of vforvic's other alters work just fine. The Begin OnLoad was the real kicker though.
I made a vault that gets raided, the one from the Bethsoft tutorials. I wanted to have an exploded Protectron in there and I was trying all different sorts of ways with just removing the head or dropping the HP to zero but nothing seemed to work.

This did the trick. Thanks all. Hopefully this will help someone else too.

Edited by Leperkhaan
Link to comment
Share on other sites

Then I think I have a good idea why it didn't work for you with OnLoad. This block type runs once, every time the parent cell of the calling reference (in this case, the NPC) is reloaded. In an interior cell, this happens every time you enter it (unless you re-enter it after just leaving), whereas in exterior cells this only happens every 3 game-days. I suspect that, when testing it, you either loaded a saved game where you were already in the same cell as the NPC, or you returned to an exterior cell which was not yet reloaded since your last visit to it.

OnLoad is actually more suitable to use here than GameMode, but the latter works just as well.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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