Asking a variable value from other script

Post » Fri Sep 07, 2012 9:58 am

Hello,
I have created 2 scripts

First script is on an item (ID: NPCClockScull) i carry in my backpack that lauches a simple timer on GameMode counting.


scn MyTimerScriptint iDoOncefloat fTimerBegin GameModeset fTimer to fTimer + GetSecondsPassedmessage "%.0f" fTimerif iDoOnce == 0set iDoOnce to 1set fTimer to 120.0endifif fTimer >= 120.0set fTimer to fTimer - 120.0 endifEnd

I want The second script (running on actor) to check for the timer variable that runs and get values from my item.
This a small part of the code:

....if NPCClockScull.fTimer >= 120.0NPC.RemoveScriptPackage NPCDrinkingCurrentLocation     NPC.RemoveScriptPackage NPCReadingCurrentLocationNPC.RemoveScriptPackage NPCEatingCurrentLocationNPC.RemoveScriptPackage NPCSleepingCurrentLocation  NPC.RemoveScriptPackage NPCWanderingCurrentLocation                                                                  set DoOnceTrigger6 to 0set DoOnceTrigger7 to 0endif....

I dont hink this works because the npc doesnt seem to respond
The scripts dont give any mistakes.

What is wrong?
Can you help me?
User avatar
Phoenix Draven
 
Posts: 3443
Joined: Thu Jun 29, 2006 3:50 am

Return to IV - Oblivion