Return Reference Function?

Post » Fri May 13, 2011 11:17 am

Is there a script function (OBSE included) which, when a player activates something, returns the reference of what has just been activated? If so, what is it?

I would like this function so, rather than attaching an OnActivate script to every relevant reference's base (causing many potential incompatibility problems and being down-right tedious), I could write one Quest Script which identifies when the player is activating a relevant reference and deals with them all.

Thanks for any help.

~Blessed be
User avatar
Amanda Furtado
 
Posts: 3454
Joined: Fri Dec 15, 2006 4:22 pm

Post » Fri May 13, 2011 9:08 am

The problem with your idea is that there's no event you could capture in a quest script to do that processing. You need an OnSomething block that gets called when event Something happens, and the only one of these for an Activate is the OnActivate on the object.
User avatar
Queen
 
Posts: 3480
Joined: Fri Dec 29, 2006 1:00 pm

Post » Fri May 13, 2011 4:29 am

You should be able to use IsControlPressed 5 (Activate) and http://cs.elderscrolls.com/constwiki/index.php/GetCrosshairRef to aquire activated target References, look at the Wiki documentation for GetCrossHairRef it contains some information pertaining to exactly what you want to do.
User avatar
Beulah Bell
 
Posts: 3372
Joined: Thu Nov 23, 2006 7:08 pm

Post » Fri May 13, 2011 3:34 pm

Thanks, SaidenStorm. That's exactly what I was looking for.

~Blessed be
User avatar
teeny
 
Posts: 3423
Joined: Sun Feb 25, 2007 1:51 am


Return to IV - Oblivion

cron