Scripters: Object Instantiation - How?

Post » Mon Jun 18, 2012 8:26 am

How can I make this work:

Main script
Scriptname IFT extends QuestObjectReference[] property MapMarkersCategory1 autoObjectReference[] property MapMarkersCategory2 autoFunction Init()IFT_CORE category1IFT_CORE category2category1.Register(MapMarkersCategory1, 3)category2.Register(MapMarkersCategory2, 1)Debug.MessageBox("Installed")EndFunction

Core script:
Scriptname IFT_CORE extends Form hiddenObjectReference[] mapMarkersFunction Register(ObjectReference[] mm, int time)Debug.MessageBox("Core init")mapMarkers = mmRegisterForUpdateGameTime(time)EndFunctionEvent OnUpdateGameTime()Debug.MessageBox("The event was received")EndEvent

So basically the main script tries to call the core script.
Everything compiles just fine.

However, only this message gets triggered: Debug.MessageBox("Installed")
The messages in the core file never does.

I wish I could do something like "IFT_CORE category2 = new IFT_CORE()" like a real object oriented language.

Anyone know a solution to getting an instance of IFT_CORE?
User avatar
Bee Baby
 
Posts: 3450
Joined: Sun Jun 18, 2006 4:47 am

Return to V - Skyrim