Accessing Functions from Script attached to Actor

Post » Sat Oct 19, 2013 3:45 am

Lets say I have this script attached to the Player

ScriptName myPlayerScript extends Actorint someNumber = 0Function myDoFunction(int newNumber)     someNumber = newNumberEndFunction

And this script attached to an new NPC

ScriptName myNPCScript extends ActorOnEvent     Game.GetPlayer().myDoFunction(77) ;This line will NOT compileEndEvent

Right now the first script would compile fine. But the second script would not compile, because it doesn't know MyDoFunction().

I need to be able to access and manipulate variables in one instance of a script from one instance of a different script.

How to?

User avatar
Kathryn Medows
 
Posts: 3547
Joined: Sun Nov 19, 2006 12:10 pm

Return to V - Skyrim