Jump to content

Hair pulling about Full Propterties actor ref.


Recommended Posts

I am pulling my hair out on this one...

 

I think it can be done, but I'm not sure.

 

I have a simple 1hand weapon.  The weapon has a script.

 

I have a spell attached to a weapon.  The spell also has a Magic Effect which has a script.  

 

In the Magic Effect script, an actor target reference is captured on the script firing, as the akTarget.

 

I want to pass the akTarget actor reference back to the script attached to the weapon itself.

 

I'm fairly sure this can be done by Full Property, but it must be done by the Set() funtion inside the Magic Effect, at the time of the Magic Effect being script processed, because it was shortly go out of scope and disappear as the Magic Effect is completed.

 

The script running on the Weapon has a actor property of actor0, as does the script on the magic effect.  The weapon script is persistent.

 

I just want to pass the actor reference from the Magic Effect script to the Weapon script as part of processing the Magic Effect.

 

 

Any suggestions?

 

-

Link to comment

This is from another forum, namely Nexus, were many others, over several years, are all asking the same question:

 

Apply a script to the magic effect of your spell.  Use the event OnEffectStart, akTarget should provide the actor. You then compare akTarget to your pre-filled actor properties of whom you want to provide different items.  But this requires you to list out all the NPCs you want to work with.  Tedious work and not usable with mod added NPCs.

 

It's all I got.  Brainstorming turned into a brain fart, sorry   tongue.gif

Yes, this is the same FUGLY conclusion I've come to... and you're right, it is cumbersome, tendious, and limited to the extreme!

 

I'm still searching for a better solution or some kind of trickly work around, and I think there may be one in the usage of a Quest Script, and attached ReferenceAlias set to the ActorRef from akTarget, which is found in the Magic Effect Script, and set in a script which fires on the OnEffectStart event, as you've stated...

 

But I cannot find enough clear documentation / examples about how to use Quest ReferenceAlias mechanism to even begin the test coding of it?

 

There are lots of places where it is talked about, but no one provides a clear, step by step tutorial on how to implement it.

 

Here are a few related web pages:

 

https://www.creationkit.com/index.php?title=ObjectReference_Script

 

https://forums.nexusmods.com/index.php?/topic/5282495-papyrus-oneffectstart-and-quest-alias-question/

 

https://forums.nexusmods.com/index.php?/topic/2071309-referring-to-actor-activemagiceffect-script/

 

https://github.com/xanderdunn/skaar/wiki/Understanding-Forms,-Object-References,-Reference-Aliases,-and-Persistence

 

Clearly, these people are all pursuing the same thing, but no one seems to have a clear idea how it is actually done!

 

I SEE it being done in some other complex mods, such as "Interesting NPCS", but those mods are far, far too large, and complex, to reverse engineer.

 

I (we) need a simple, clear cut, explained, tutorial example of how to use quests, ReferenceAlias to MagicEffect akTarget values, to pass an actor reference from one script to another.

 

In essence, we need a way to pass an instance (not base) actor ID from one script to another, through what amounts to a Global Variable, like we might pass an Integer of how many materials of a particular type a room or container holds.

 

-

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use