Access script properties from another script

Post » Mon Nov 19, 2012 11:24 am

Let's say I want a script attached to a magic effect accessing properties from a script attached to an activator.

1. I make the property available in the activator script. i.e. "Int Property IntProp Auto"

2. I set "ActivatorScriptName Property ???? Auto" in the magic effect script.

3. I call that property using "????.IntProp"

What is the ????

I've only seen examples on accessing quest properties. Thanks.
User avatar
MARLON JOHNSON
 
Posts: 3377
Joined: Sun May 20, 2007 7:12 pm

Post » Mon Nov 19, 2012 2:51 am

You are still using standard property syntax for those properties. The ???? is the identifier, which can be whatever you want it to be.
User avatar
Lynne Hinton
 
Posts: 3388
Joined: Wed Nov 15, 2006 4:24 am

Post » Mon Nov 19, 2012 9:19 am

The ???? is the property name. You can name it whatever, like 'ActivatorScript' is what I'd name it.
User avatar
Rachel Hall
 
Posts: 3396
Joined: Thu Jun 22, 2006 3:41 pm

Post » Mon Nov 19, 2012 7:24 am

Thank you. I have another question though. Is it possible to pass variables between multiple magic effect scripts without the use of global variables or an intermediate script? If so how would I reference the magic effect?
User avatar
Andrea Pratt
 
Posts: 3396
Joined: Mon Jul 31, 2006 4:49 am

Post » Mon Nov 19, 2012 7:59 am

Nope. ActiveMagicEffect scripts aren't bound to anything, so you'll need to use globals (which there's nothing wrong with).
User avatar
Isaac Saetern
 
Posts: 3432
Joined: Mon Jun 25, 2007 6:46 pm

Post » Mon Nov 19, 2012 11:35 am

you can also put all the needed data in the activator script, since your magiceffects can have access to it.
User avatar
JLG
 
Posts: 3364
Joined: Fri Oct 19, 2007 7:42 pm


Return to V - Skyrim