Jump to content

Create a weapon script to instantly kill when stealthed


Løve

Recommended Posts

Hi

 

I'm trying to make a script for a custom weapon to instantly kill someone when you are stealthed and sneak attacking them from behind. It's meant as an assasin dagger to kill instantly from behind when unnoticed because I'm tired of people surviving getting stabbed in the back with a sword.

 

I haven't got too much experience with scripting, so so far I've come up with something that won't compile. =/

 

ScriptName InstantDeath

Begin OnHit Kill ActorId (optional)

End

 

Any help would be appreciated. :)

Link to comment
Share on other sites

we hav to be able to do it Spinter Cell style, or else ur goin to hav to do the multipllier. or....damn i forgot
Link to comment
Share on other sites

If you want a weapon to kill instantly when stealthed you could do the following:

 

Create the following script in the construction set (make sure the script is a magical effect; you can select this in the upper right corner):

 

SCN instantdeath

 

short playerdetected

 

Begin GameMode

 

if ( GetDetected player )

return

else

kill

endif

 

End

 

Once you have created the script you have to create an enchantment. You then have to add a scripted effect to the enchantment (it's in the effect list). Use the script you just created. Then you have to add the enchantment to the weapon you want to give the instant sneak kill.

 

If you want to kill essential caracters too you can change the part of the script in between else and endif (kill) with the following:

if IsEssential

SetEssential 0

Kill

else

kill

 

Be aware that you will break quests when you use this.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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