OBSE 19 OnMurder Event

Post » Mon Jan 03, 2011 3:12 pm

I cannot seem to get the OnMurder event to trigger. Do I actually have to get a 1000 septim bounty? The game is tallying up my murders but this event is not. The OnKill event works fine:
SetEventHandler "OnDeath" WOLEvtOnDeathTarget "form"::PlayerRefSetEventHandler "OnMurder" WOLEvtOnMurderTarget "form"::PlayerRef


Even if I try the OnMurder event without the "form"::PlayerRef it will not trigger.
User avatar
!beef
 
Posts: 3497
Joined: Wed Aug 16, 2006 4:41 pm

Post » Sun Jan 02, 2011 11:57 pm

Try this:
SetEventHandler "OnDeath" WOLEvtOnDeathTarget object::PlayerRefSetEventHandler "OnMurder" WOLEvtOnMurderTarget object::PlayerRef
With the event handler functions there are 2 arguments.
The first argument is always called "ref" and the second "object"
Their name doesn't mean anything: "ref" doesn't mean it require a reference nor "object" a base object.

Look at the http://obse.silverlock.org/obse_command_doc.html#Events.

You are using the second one. So you need to put "object" (without quotes).
User avatar
Isaac Saetern
 
Posts: 3432
Joined: Mon Jun 25, 2007 6:46 pm

Post » Mon Jan 03, 2011 11:51 am

Okay, I was thrown by the docs that shows:

OnDeath				target:ref killer:formOnMurder			target:ref killer:form


Strange that OnDeath works with the 'form' keyword. I went ahead and changed it to object like you suggested and OnDeath still works, but OnMurder does not.
User avatar
Heather Stewart
 
Posts: 3525
Joined: Thu Aug 10, 2006 11:04 pm

Post » Mon Jan 03, 2011 10:50 am

Why did this get moved to the construction set forum? This is a specific question about OBSE v0019. This is not a question on how to use the Construction Set.
User avatar
Josh Trembly
 
Posts: 3381
Joined: Fri Nov 02, 2007 9:25 am

Post » Mon Jan 03, 2011 3:09 pm

Okay, I was thrown by the docs that shows:

OnDeath				target:ref killer:formOnMurder			target:ref killer:form


Strange that OnDeath works with the 'form' keyword. I went ahead and changed it to object like you suggested and OnDeath still works, but OnMurder does not.

Nope - notice the syntax - form is a return type - object is a key in a key value pair - ref can be both depending on placement (ref::PlayerRef is the key in the pair while rVariable:ref - when you see it in a function definition - means the rVariable must be a reference variable)

Why did this get moved to the construction set forum? This is a specific question about OBSE v0019. This is not a question on how to use the Construction Set.

They should be moved here as OBSE is a modder's/scripters affair and these reside in this forum - alternatively you should ask directly in the OBSE thread.
User avatar
Laura Simmonds
 
Posts: 3435
Joined: Wed Aug 16, 2006 10:27 pm

Post » Mon Jan 03, 2011 1:19 am

Nope - notice the syntax - form is a return type - object is a key in a key value pair - ref can be both depending on placement (ref::PlayerRef is the key in the pair while rVariable:ref - when you see it in a function definition - means the rVariable must be a reference variable)

Nope what? The OnDeath function works with either "form" or "object" (or seems to). While I get no response from the OnMurder event. Return type? What does that mean? Is there a variable the Function provides I can check against? I don't understand what you are trying to tell me. How does your response solve the unresponsive OnMurder event?
User avatar
joseluis perez
 
Posts: 3507
Joined: Thu Nov 22, 2007 7:51 am


Return to IV - Oblivion