Jump to content

killactor script


DaemonGrin

Recommended Posts

How do I make a cubic activator trigger the dismemberment of a dead npc? on GameMode. I currently have a script that won't save unless I use player as the killer. I gave the trigger a ref ID, gave the corpse a ref ID but it refuses to save. The trigger is Persistent ref so is the corpse.

scn DGDismember01SCRIPT

short DoOnce

Begin GameMode

if ( DoOnce == 0 )
	KillActor Player
EndIf
Set DoOnce to 1

END

That saves, but this refuses too.

scn DGDismember01SCRIPT

short DoOnce

Begin GameMode

if ( DoOnce == 0 )
	KillActor DGActorKillerREF
EndIf
Set DoOnce to 1

END

I've also tried

scn DGDismember01SCRIPT

short DoOnce

Begin GameMode

if ( DoOnce == 0 )
	DGKillActorREF.KillActor DGActorKillerREF 1
EndIf
Set DoOnce to 1

END

DGKillActorREF is the corpse and DGActorKillerRef is the trigger.

 

Thanks,

Geoff

Link to comment
Share on other sites

Looks like you want the script to run when the cell is loaded? You could just put the script on the NPC.

I'm pretty sure you need to specify a killer (any ActorREF) if you want to use a limb number. You don't have to use the player. you can blame it on any actor that's persistent and has a REFid





;NPC script - blame it on Ceasar

scn DGDismemberNPCSCRIPT

short DoOnce

Begin GameMode

if ( DoOnce == 0 ) && HasLoaded3D
KillActor FortCaesarRef 1
Set DoOnce to 1
EndIf

END




;Trigger script

scn DGDismemberNPCSCRIPT

short DoOnce

Begin GameMode

if ( DoOnce == 0 ) && (DGKillActorREF.HasLoaded3D)
DGKillActorREF.KillActor FortCaesarRef 1
Set DoOnce to 1
EndIf

END

Link to comment
Share on other sites

  • Recently Browsing   0 members

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