[RELz] Oblivion Script Extender (OBSE) 0019b

Post » Wed Sep 01, 2010 1:20 pm

Oh, please take your time - I'm sure I can hang on to CSE for another month or so :P


YOU might be able to hang on to CSE for another month or so... Another tease :sigh:
User avatar
Austin Suggs
 
Posts: 3358
Joined: Sun Oct 07, 2007 5:35 pm

Post » Wed Sep 01, 2010 6:42 pm

I'm going to assume by 'object' you mean 'non-actor' (otherwise you'd just use OnHit, right?)
I'm not sure there's a foolproof way to do it at present, though I haven't kept up with developments among the talented pool of scripters here. There are some rough ways to do it if you want to know when the player hits an object, but they don't apply more generally.
Might be best to make a thread over in the CS forum about it.

No, not really. OnHit runs when the target actor is hit by something, what I was asking for is a way to get that "something"'s reference. Kind of like how you can get ProjectileSource

Truth is, I didn't know OnHit can work without ActorID parameter until you said that (I guess I didn't read everything clearly). Maybe what I want can be done with OnHit and doesn't require any dedicated functions, I'll make a thread in CS forum about it. Thanks
User avatar
Jesus Sanchez
 
Posts: 3455
Joined: Sun Oct 21, 2007 11:15 am

Post » Wed Sep 01, 2010 8:46 pm

Something akin to GetActionRef for OnHit would be awesome, though.
User avatar
Nicole Elocin
 
Posts: 3390
Joined: Sun Apr 15, 2007 9:12 am

Post » Thu Sep 02, 2010 1:17 am

^What he said! That would be a very, very useful function.
User avatar
Nicole Kraus
 
Posts: 3432
Joined: Sat Apr 14, 2007 11:34 pm

Post » Wed Sep 01, 2010 12:58 pm

You could use the OnHit Event Handler for that:

http://obse.silverlock.org/obse_command_doc.html#Events

SetEventHandler "OnHit" OnHitHandlerScript ref:: object::

The filters are optional.

The EventHandler script (object script):

-------------
scn OnHitHandlerScript

ref target
ref attacker

begin Function { target, attacker }
;The variables are automatically filled with the target and attacker references
;Do with them what you need here
end
-------------


I hope this is understandable. If not, just tell us more specifically what you want to achieve so I can give a more detailed example.
User avatar
SEXY QUEEN
 
Posts: 3417
Joined: Mon Aug 13, 2007 7:54 pm

Post » Wed Sep 01, 2010 10:53 pm

Oh well that's is just amazing. I need to read up on Event Handlers.
User avatar
StunnaLiike FiiFii
 
Posts: 3373
Joined: Tue Oct 31, 2006 2:30 am

Post » Wed Sep 01, 2010 7:06 pm

Time for a new one
User avatar
Jason King
 
Posts: 3382
Joined: Tue Jul 17, 2007 2:05 pm

Previous

Return to IV - Oblivion