Jump to content

The Restoration Movement - US


Deleted2746547User

Recommended Posts

Working on a new mod and could use scripting/quest help from anyone willing to lend their time and expertise.

 

The MOD IS: Restoration Movement - US

 

READ MOD DESCRIPTION) and definitely need some coding assistance with scripts, quests,etc.

 

Also, anyone that would like to test, give feedback, or help with development - please let me know.

 

THANKS!!

Link to comment
Share on other sites

You'll be a lot better off asking specific questions for things you get stumped on.

 

 

There you are again! Very good to see you... Ok, so here are three scripts to go with 1 of my main problems....

 

 

One major issue I'm having is with a "power" script. That is, I set up a Quest that handles the "power" for lights, computers, etc. at the base I'm constructing in my mod.

Once you provide fission batteries that enables a script that will allow you to turn on various light switches, etc. throughout the base. however, once you run out of batteries (batteries convert to "fuel" in the script) the lights turn off and you have to provide more. etc.

 

Anyway, I had it working correctly before but now, I can't get it working. not sure if its b/c of a change in link ref or enable ref or WHAT.. but i'll include the scripts so hopefully someone can help me figure out what im missing....

 

One script is part of the BASE QUEST ..

the second handles the "fuel" tank

and the light script (last) is activated when you turn on various light switches (lights are tied to markers ... when you turn on a light swtich it turns on all the light enabled by a particular marker) The marker is enabled if there is fuel in the tank.

 

Again, I had it working and cant figure out what I changed... (jnitially disabled, enable parent, link ref or what)

 

If you want to look at the mod/esp >>> look at the Restoration movement mod in my signature.

 

THANKS!!!!!!!!!

 

PS: The .esp is in m signature if you need to see the file itself.

 

$$$$$$$$$$$$$$$$$$$$$$$$

 

 

POWER BASE SCRIPT {RAN AS PART OF THE BASE QUEST}

---

scn BlackbriarPowerBaseQuestScript

 

int Fuel ; This is the total fuel units in stock

int FuelRqd ; This is the calculated amount that will be used in a single 5 second period

 

Begin GameMode

If Fuel

Else

return

Endif

 

set FuelRqd to 0

 

;Lghts1 uses 3 unit of Fuel/5sec

If BlackbriarLgts1.GetDisabled

Else

set FuelRqd to FuelRqd + 3

Endif

 

;Lghts2 uses 1 unit of Fuel/5sec

If BlackbriarLgts2.GetDisabled

Else

set FuelRqd to FuelRqd + 1

Endif

 

;Lghts3 uses 2 unit of Fuel/5sec

If BlackbriarLgts3.GetDisabled

Else

set FuelRqd to FuelRqd + 2

Endif

 

;Lghts4 uses 1 unit of Fuel/5sec

If BlackbriarLgts4.GetDisabled

Else

set FuelRqd to FuelRqd + 1

Endif

 

;Lghts5 uses 1 unit of Fuel/5sec

If BlackbriarLgts5.GetDisabled

Else

set FuelRqd to FuelRqd + 1

Endif

 

;Lghts6 uses 1 unit of Fuel/5sec

If BlackbriarLgts6.GetDisabled

Else

set FuelRqd to FuelRqd + 1

Endif

 

;Lghts7 uses 1 unit of Fuel/5sec

If BlackbriarLgts7.GetDisabled

Else

set FuelRqd to FuelRqd + 3

Endif

 

;Lghts8 uses 1 unit of Fuel/5sec

If BlackbriarLgts8.GetDisabled

Else

set FuelRqd to FuelRqd + 1

Endif

 

;Lghts9a uses 1 unit of Fuel/5sec

If BlackbriarLgts9a.GetDisabled

Else

set FuelRqd to FuelRqd + 1

Endif

 

;Lghts10a uses 1 unit of Fuel/5sec

If BlackbriarLgts10a.GetDisabled

Else

set FuelRqd to FuelRqd + 1

Endif

 

;Lghts11 uses 1 unit of Fuel/5sec

If BlackbriarLgts11.GetDisabled

Else

set FuelRqd to FuelRqd + 1

Endif

 

;Lghts12 uses 1 unit of Fuel/5sec

If BlackbriarLgts12.GetDisabled

Else

set FuelRqd to FuelRqd + 1

Endif

 

;Subtract the fuel used

set Fuel to Fuel - FuelRqd

 

;Turn off all power users when Fuel runs out.

If Fuel < 1

set Fuel to 0

BlackbriarLgts1.Disable

BlackbriarLgts2.Disable

BlackbriarLgts3.Disable

BlackbriarLgts4.Disable

BlackbriarLgts5.Disable

BlackbriarLgts6.Disable

BlackbriarLgts7.Disable

BlackbriarLgts8.Disable

BlackbriarLgts9a.Disable

BlackbriarLgts10a.Disable

BlackbriarLgts11.Disable

BlackbriarLgts12.Disable

 

Endif

 

End

 

 

 

 

$$$$$$$$$$$$$$$$$$$$ NEXT SCRIPT$$$$$$$$$$$$$$$$$$$$$

 

Fuel Tank Script

 

scn BlackbriarFuelTank

Begin onActivate

If GetQuestRunning BlackbriarPowerBaseQuest

Else

StartQuest BlackbriarPowerBaseQuest

Endif

 

If player.GetItemCount FissionBattery

player.removeItem FissionBattery 1

set BlackbriarPowerBaseQuest.Fuel to BlackbriarPowerBaseQuest.Fuel + 1500

Else

; ShowMessage BlackbriarPowerNoBatteries ; Uncomment when/if you want to display a msg.

Endif

End

 

 

$$$$$$$$$$$$$$$$$$$NEXT SCRIPT$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

 

Power light script

 

ScriptName BlackbriarPowerLightScript

 

ref light

 

Begin OnActivate

if BlackbriarPowerBaseQuest.Fuel == 0

return

Endif

if light == 0

set light to GetLinkedRef

endif

 

if light.GetDisabled

light.Enable

else

light.Disable

endif

Activate

End

Link to comment
Share on other sites

Haven't looked at your esp yet, but I'm pretty sure you can't just do

if myref.getdisabled
dostuff
endif

 

It has to be

if myref.getdisabled == 0 ;or set to 1 if you want stuff to happen when myref is disabled.
do stuff ;if myref is enabled
endif

 

I don't believe your scripts would compile if it's not like that.

Link to comment
Share on other sites

I'll try that but trust me, it worked before. Well, I had it working in a later version (lost my updated files so not sure what corrections I had made)....

 

will try that though... THANKS

 

 

 

Haven't looked at your esp yet, but I'm pretty sure you can't just do

if myref.getdisabled
dostuff
endif

 

It has to be

if myref.getdisabled == 0 ;or set to 1 if you want stuff to happen when myref is disabled.
do stuff ;if myref is enabled
endif

 

I don't believe your scripts would compile if it's not like that.

Link to comment
Share on other sites

if that is the problem, can you help me make corrections in the script because I'm a little lost on that.

it

Haven't looked at your esp yet, but I'm pretty sure you can't just do

if myref.getdisabled
dostuff
endif

 

It has to be

if myref.getdisabled == 0 ;or set to 1 if you want stuff to happen when myref is disabled.
do stuff ;if myref is enabled
endif

 

I don't believe your scripts would compile if it's not like that.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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