Jump to content

HELP - Script Not Working


Iconic985

Recommended Posts

Hey Guys! I was working on a script that causes a message box to appear upon an actors death. Here is a script I found on the wiki:

Event OnDeath(Actor akKiller)
  if (akKiller == Game.GetPlayer())
    Debug.Trace("We were killed by the player!")
  endIf
endEvent

 

So in order to test this I applied it to an NPC in the creation kit via "Scripts" in the character creation menu however when I do kill the NPC nothing happens. Is this the right script? or am I using the wrong one? and if so what should I use?

 

Thanks in advance :biggrin:

 

Link to comment
Share on other sites

You could to that, but why not make it a notification, instead

. It'll be easier than making another object. (Please take into account that this is coming from someone who has done a fair amount of scripting BUT has NOT done anything with messages... at all.) If it were me, I'd replace "Debug.Trace" with "Debug.Notification".

Link to comment
Share on other sites

You could to that, but why not make it a notification, instead

. It'll be easier than making another object. (Please take into account that this is coming from someone who has done a fair amount of scripting BUT has NOT done anything with messages... at all.) If it were me, I'd replace "Debug.Trace" with "Debug.Notification".

True, but the original poster said he wanted to "cause a message box to appear", message box won't appear with debug.notification

Link to comment
Share on other sites

  • Recently Browsing   0 members

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