Gaming Underground Network

Come for the mods, stay for the community
 
HomePortalLatest imagesInterviewsRegisterLog in
Search
 
 

Display results as :
 

 


Rechercher Advanced Search
Info Panel
______________
MOD MASTER THREADS:
FALLOUT
THE ELDER SCROLLS

______________


______________


GUNinsider
Fallout Miami: Mika999
Stay Connected

GUNetwork
Keywords
NPCs boomers brotherhood clone money leon Duty vault Reforged port hunk khan commonwealth riot marvel power Superpele Mask Gear body Metal boom Ryse machine ghoul dead
Latest topics
» Here Are Some Of The Best Mods From GunNetwork
Help to understand a Script. Emptyby Sinister_Is_Random Sat Aug 31, 2024 1:38 am

» Saying hi after two years
Help to understand a Script. Emptyby spiralsandspirals Wed Aug 28, 2024 11:39 pm

» Weird bug or glitch with Console Command. [FNV]
Help to understand a Script. Emptyby STQayas Sun Aug 25, 2024 12:19 am

» Looking for an alternative to Nexus
Help to understand a Script. Emptyby freakoverse Fri Aug 23, 2024 9:50 am

» fallout 4 mods
Help to understand a Script. Emptyby salientguitar4 Mon Aug 19, 2024 4:47 pm

» [FNV] How to troubleshot infinite loading issues?
Help to understand a Script. Emptyby Abyssfer Wed Aug 14, 2024 4:28 pm

» Fnv Enable player control command
Help to understand a Script. Emptyby GenJohnWilliam Mon Aug 05, 2024 8:25 pm

» Problem with Dragbodies NCR overhaul
Help to understand a Script. Emptyby Lankychazz2009 Fri Aug 02, 2024 7:53 pm

» NCR Trooper Overhaul Armors with NCR Ultimate Overhaul
Help to understand a Script. Emptyby Abyssfer Thu Aug 01, 2024 7:29 pm

» Roland Deschain ist The Mysterious Stranger and other t
Help to understand a Script. Emptyby SpaceRanger Mon Jul 22, 2024 9:15 am

» Guns you want in Fallout
Help to understand a Script. Emptyby SpaceRanger Mon Jul 22, 2024 8:25 am

» [FO4] Doom 2016 models as replecement.
Help to understand a Script. Emptyby SpaceRanger Sun Jul 21, 2024 8:12 am

» [FO4] Secret Service armor, helmet headlamp
Help to understand a Script. Emptyby fossaceca17 Sun Jul 21, 2024 3:19 am

» The Legion are fascists, let's discuss it.
Help to understand a Script. Emptyby Cipher22 Fri Jul 12, 2024 4:28 am

» The Next fallout
Help to understand a Script. Emptyby Cipher22 Fri Jul 12, 2024 4:25 am

» Your favorite mods for F:NV
Help to understand a Script. Emptyby Cipher22 Fri Jul 12, 2024 4:21 am

» Afterlife discord
Help to understand a Script. Emptyby Willaemann Tue Jul 09, 2024 6:44 pm

» What happened to Outlawer's pack 1?
Help to understand a Script. Emptyby Trappy82 Mon Jun 17, 2024 5:17 am

» Greetings
Help to understand a Script. Emptyby septron Fri Jun 14, 2024 1:49 pm

» Starfield
Help to understand a Script. Emptyby jaypak Mon Jun 10, 2024 8:56 am

September 2024
MonTueWedThuFriSatSun
      1
2345678
9101112131415
16171819202122
23242526272829
30      
CalendarCalendar
_
September 2024
MonTueWedThuFriSatSun
      1
2345678
9101112131415
16171819202122
23242526272829
30      
CalendarCalendar

Share
 

 Help to understand a Script.

View previous topic View next topic Go down 
AuthorMessage
missaka

missaka

Posts : 11
Join date : 2015-06-04

Help to understand a Script. Empty
PostSubject: Help to understand a Script.   Help to understand a Script. EmptySat Sep 12, 2015 8:50 pm

Hello guys, im trying to understand some pieces of a script and i would like some help...

Code:
short modIndex
short scopeMod
short modEffect
short weapFlags
ref currWeapon
         
;get the player weapon
set currWeapon to player.GetEquippedObject 5

;scope flag set?
if GetWeaponHasScope currWeapon

   
   ; check the possible modifications to see if it can have a scope mod attached to it
   set scopeMod to 0
   set modIndex to 1

   Label 10
   set modEffect to GetWeaponItemModEffect modIndex currWeapon
   if modEffect == 14
      set scopeMod to modIndex
   else
      set modIndex to modIndex + 1
      if modIndex < 4
         GoTo 10   
      endif
   endif

   if scopeMod
      ; scope comes from a mod.. see if player has that mod attached
      set weapFlags to Player.GetEquippedWeaponModFlags      
      if LogicalAnd  weapFlags scopeMod

         ; has scope mod attached

      else

         ; no scope mod attached

      endif
   else

      ; weapon has scope built into it

   endif
else

   ; scope not available for this weapon

endif

In this part:

Code:
set modEffect to GetWeaponItemModEffect modIndex currWeapon
   if modEffect == 14
      set scopeMod to modIndex
   else
      set modIndex to modIndex + 1
      if modIndex < 4
         GoTo 10   
      endif
   endif

Lets say that the slot index 3 it's for the scope. It will loop until modIndex reach 3, then

Code:
if modEffect == 14

will be true and, in the line

Code:
set scopeMod to modIndex

, scopeMod will assume the same value of modIndex, which means 3. CORRECT?

This part below doesn't make sense to me. If what? If scopeMod is different from zero?

Code:
if scopeMod

At last, what this piece do?

Code:
set weapFlags to Player.GetEquippedWeaponModFlags      
      if LogicalAnd  weapFlags scopeMod

I know that the function GetEquippedWeaponFlags returns the value 1,2 or 4 (or a combination of then: 2,5,6 or 7). Assuming that there are three mods into the weapon, the
function will return the value 7.

This part
Code:
if LogicalAnd weapFlags scopeMod
will check if both are different from zero or what?
Back to top Go down
 

Help to understand a Script.

View previous topic View next topic Back to top 
Page 1 of 1

 Similar topics

-
» Issue with recompiling a script (for TTW)
» [FNV] Need Help With A Script
» Blender Nif Script help
» Weather script for Fallout 3
» Fallout 4 Script extender

Permissions in this forum:You cannot reply to topics in this forum
Gaming Underground Network :: Fallout :: Troubleshooting-