Jump to content

Script that controls glow maps?


KiCHo666

Recommended Posts

No, no dice. :/

This is how whole activator script looks like:

SCN MTActivatorScript

short iButton
short iRepairMenu
short iMap
short bNight
ref rActivator
Begin OnActivate
If GetActionRef == Player && Player.IsInCombat == 0
If MTCurrentCondition < 0
Set MTCurrentCondition to 0
elseif MTCurrentFuel < 0
Set MTCurrentFuel to 0
Endif
ShowMessage MTMenuMessage MTCurrentFuel MTCurrentCondition
ElseIf GetActionRef == Player && Player.IsInCombat == 1
ShowMessage MTCombatMessage
endif
End
Begin GameMode
if bNight != ((GameHour > 19) || (GameHour < 5))
set bNight to (bNight == 0)
set rActivator to MTMojaveTravelActivator
if bNight
SetModelPathEX "vehicles\UniqueMotorcycle\UniqueMotorcycleNight.nif" rActivator
else
SetModelPathEX "vehicles\UniqueMotorcycle\UniqueMotorcycle.nif" rActivator
endif
Disable
Enable 0
endif
set iButton to GetButtonPressed
if iButton == -1 ; No button has been pressed yet
Return
elseif iRepairMenu == 0
if iButton == 0 ; Travel
If MTCurrentFuel > 0 && MTCurrentCondition > 0
ShowMessage MTSelectDestinationMessage
Set iMap to 1
elseif MTCurrentFuel == 0
ShowMessage MTTankEmpty
elseif MTCurrentCondition == 0
ShowMessage MTLowCondition
endif
elseif iButton == 1 ; Refuel
If MTCurrentFuel < 100
If player.GetItemCount MTFuel > 0
PlaySound WPNFlamerReload 1
Player.removeItem MTFuel 1
Set MTCurrentFuel to ( MTCurrentFuel + 10 )
PlaySound WPNFlamerJam 1
If MTCurrentFuel > 100
set MTCurrentFuel to 100
endif
ShowMessage MTMenuMessage MTCurrentFuel MTCurrentCondition
Return
else
ShowMessage MTNoFuel
endif
else
ShowMessage MTTankFull
endif
elseif iButton == 2 ; Repair
ShowMessage MTRepairMenu MTCurrentCondition
Set iRepairMenu to 1
elseif iButton == 3 ; Store Items
MTTrunkRef.Activate Player
endif
elseif iRepairMenu == 1
if iButton == 0 ; Gas Tank
If MTCurrentCondition >= 100
ShowMessage MTFullCondition
ShowMessage MTMenuMessage MTCurrentFuel MTCurrentCondition
set iRepairMenu to 0
Return
else
Player.RemoveItem MotorCycleGasTank 1
PlaySound UIRepairWeapon 1
Set MTCurrentCondition to ( MTCurrentCondition + (Player.GetActorValue Repair/5 + 10) )
If MTCurrentCondition > 100
Set MTCurrentCondition to 100
endif
endif
ShowMessage MTRepairMenu MTCurrentCondition
Return
elseif iButton == 1 ; Handbrake
If MTCurrentCondition >= 100
ShowMessage MTFullCondition
ShowMessage MTMenuMessage MTCurrentFuel MTCurrentCondition
set iRepairMenu to 0
Return
else
Player.RemoveItem MotorCycleHandbrake 1
PlaySound UIRepairWeapon 1
Set MTCurrentCondition to ( MTCurrentCondition + (Player.GetActorValue Repair/10 + 5) )
If MTCurrentCondition > 100
Set MTCurrentCondition to 100
endif
endif
ShowMessage MTRepairMenu MTCurrentCondition
Return
elseif iButton == 2 ; Conductor
If MTCurrentCondition >= 100
ShowMessage MTFullCondition
ShowMessage MTMenuMessage MTCurrentFuel MTCurrentCondition
set iRepairMenu to 0
Return
else
Player.RemoveItem Conductor 1
PlaySound UIRepairWeapon 1
Set MTCurrentCondition to ( MTCurrentCondition + Player.GetActorValue Repair/4 )
If MTCurrentCondition > 100
Set MTCurrentCondition to 100
endif
endif
ShowMessage MTRepairMenu MTCurrentCondition
Return
elseif iButton == 3 ; Fission Battery
If MTCurrentCondition >= 100
ShowMessage MTFullCondition
ShowMessage MTMenuMessage MTCurrentFuel MTCurrentCondition
set iRepairMenu to 0
Return
else
Player.RemoveItem FissionBattery 1
PlaySound UIRepairWeapon 1
Set MTCurrentCondition to ( MTCurrentCondition + Player.GetActorValue Repair/3 )
If MTCurrentCondition > 100
Set MTCurrentCondition to 100
endif
endif
ShowMessage MTRepairMenu MTCurrentCondition
Return
elseif iButton == 4 ; Scrap Metal
If MTCurrentCondition >= 100
ShowMessage MTFullCondition
ShowMessage MTMenuMessage MTCurrentFuel MTCurrentCondition
set iRepairMenu to 0
Return
else
Player.RemoveItem SpareParts 1
PlaySound UIRepairWeapon 1
Set MTCurrentCondition to ( MTCurrentCondition + Player.GetActorValue Repair/10 )
If MTCurrentCondition > 100
Set MTCurrentCondition to 100
endif
endif
ShowMessage MTRepairMenu MTCurrentCondition
Return
elseif iButton == 5 ; Scrap Electronics
If MTCurrentCondition >= 100
ShowMessage MTFullCondition
ShowMessage MTMenuMessage MTCurrentFuel MTCurrentCondition
set iRepairMenu to 0
Return
else
Player.RemoveItem ScrapElectronics 1
PlaySound UIRepairWeapon 1
Set MTCurrentCondition to ( MTCurrentCondition + Player.GetActorValue Repair/10 )
If MTCurrentCondition > 100
Set MTCurrentCondition to 100
endif
endif
ShowMessage MTRepairMenu MTCurrentCondition
Return
elseif iButton == 6 ; Wonderglue
If MTCurrentCondition >= 100
ShowMessage MTFullCondition
ShowMessage MTMenuMessage MTCurrentFuel MTCurrentCondition
set iRepairMenu to 0
Return
else
Player.RemoveItem Wonderglue 1
PlaySound UIRepairWeapon 1
Set MTCurrentCondition to ( MTCurrentCondition + Player.GetActorValue Repair/10 )
If MTCurrentCondition > 100
Set MTCurrentCondition to 100
endif
endif
ShowMessage MTRepairMenu MTCurrentCondition
Return
elseif iButton == 7 ; DuctTape
If MTCurrentCondition >= 100
ShowMessage MTFullCondition
ShowMessage MTMenuMessage MTCurrentFuel MTCurrentCondition
set iRepairMenu to 0
Return
else
Player.RemoveItem DuctTape 1
PlaySound UIRepairWeapon 1
Set MTCurrentCondition to ( MTCurrentCondition + Player.GetActorValue Repair/10 )
If MTCurrentCondition > 100
Set MTCurrentCondition to 100
endif
endif
ShowMessage MTRepairMenu MTCurrentCondition
Return
elseif iButton == 8 ; Finshed
ShowMessage MTMenuMessage MTCurrentFuel MTCurrentCondition
set iRepairMenu to 0
Return
endif
endif
If iMap == 1
set iMap to 0
TapControl 14
; Player.CastImmediateOnSelf MojaveTravelEffectDummy
Player.CastImmediateOnSelf MTActorEffect
endif
End

 

 

 

The bolded part is where I put script you wrote.

If that will not work, would it be possible to make Quest and use that script?
I already tryed that, but it won't accept it as a quest, only as an object. So I guess something has to be changed.

Edited by KiCHo666
Link to comment
Share on other sites

  • 1 month later...

HOLY CRAP all of you totally are overthinking this BIG TIME wow.

Simply attach a Forward/Backward NiController to the Material, then in script use:

if bNight != ((GameHour > 19) || (GameHour < 5))
set bNight to (bNight == 0)
set rActivator to MTMojaveTravelActivator
if bNight
Playgroup.Forward rActivator
else
Playgroup.Backward rActivator
endif
Disable
Enable 0
endif

 

 

That's all there is to it.
Playgroups are your friend. Use them.

Doing this would be only a few mere minutes of work an effort, and would give you a very pleasing visual that you desire.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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