Page 9 of 9

[RELz] Oblivion Script Extender (OBSE) 0019b

PostPosted: Wed Sep 01, 2010 1:20 pm
by Austin Suggs
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:

[RELz] Oblivion Script Extender (OBSE) 0019b

PostPosted: Wed Sep 01, 2010 6:42 pm
by Jesus Sanchez
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

[RELz] Oblivion Script Extender (OBSE) 0019b

PostPosted: Wed Sep 01, 2010 8:46 pm
by Nicole Elocin
Something akin to GetActionRef for OnHit would be awesome, though.

[RELz] Oblivion Script Extender (OBSE) 0019b

PostPosted: Thu Sep 02, 2010 1:17 am
by Nicole Kraus
^What he said! That would be a very, very useful function.

[RELz] Oblivion Script Extender (OBSE) 0019b

PostPosted: Wed Sep 01, 2010 12:58 pm
by SEXY QUEEN
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.

[RELz] Oblivion Script Extender (OBSE) 0019b

PostPosted: Wed Sep 01, 2010 10:53 pm
by StunnaLiike FiiFii
Oh well that's is just amazing. I need to read up on Event Handlers.

[RELz] Oblivion Script Extender (OBSE) 0019b

PostPosted: Wed Sep 01, 2010 7:06 pm
by Jason King
Time for a new one