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
daryl fett vault Reforged Call jedi ghoul hunk boom body riot Brotherhood machine money power dead FCOM Ryse NPCs wolfenstein boomers khan marvel upgrades Mask boba
Latest topics
» [FNV] Weird facial problem when using Dragbody overhaul
Help to understand a Script. Emptyby NayutaM Yesterday at 6:54 pm

» HALLOWEEN MOD THE INNSMOUTHS CITIZENS FALLOUT 4
Help to understand a Script. Emptyby klaatu27 Yesterday at 11:38 am

» 76 workshop port
Help to understand a Script. Emptyby Babyhaze Sat Dec 09, 2023 11:13 am

» 76 workshop port
Help to understand a Script. Emptyby Babyhaze Sat Dec 09, 2023 11:12 am

» I come seeking mods
Help to understand a Script. Emptyby DiamondKiril Tue Dec 05, 2023 5:49 pm

» [FNV] Strange lucky 38 penthouse bug
Help to understand a Script. Emptyby 54yeggan Thu Nov 30, 2023 5:35 pm

» Afterlife discord
Help to understand a Script. Emptyby fallenout_franky Wed Nov 29, 2023 3:13 pm

» Medieval Fantasy Screenshot Contest
Help to understand a Script. Emptyby Yuri.a.r Mon Nov 27, 2023 9:34 pm

» hey good ppl of this shady place:)
Help to understand a Script. Emptyby radiomasson Sun Nov 26, 2023 8:05 pm

» Problem with dragbody's overhauls
Help to understand a Script. Emptyby Lilith Wed Nov 22, 2023 5:17 am

» Here for the funnies
Help to understand a Script. Emptyby OGjustwhy Tue Nov 21, 2023 6:19 am

» Frontier Cars Standalone Video on Youtube by Lord Zomx
Help to understand a Script. Emptyby chubbiestwinter Sun Nov 12, 2023 11:52 pm

» Fallout New Vegas Stuttering And LOD Problems
Help to understand a Script. Emptyby KZero Thu Nov 09, 2023 7:21 pm

» Guns you want in Fallout
Help to understand a Script. Emptyby cADEIRAgAMES Mon Nov 06, 2023 1:05 pm

» FNV Upgrades From The Commonwealth (REQUEST)
Help to understand a Script. Emptyby Angel1 Sun Oct 29, 2023 3:10 pm

» The GUN Insider: The Radioactive Beaches of Miami
Help to understand a Script. Emptyby Knightingale Mon Oct 23, 2023 6:45 pm

» OG Modder
Help to understand a Script. Emptyby Bahb3 Sat Oct 14, 2023 9:17 am

» New here! Very old everywhere else!
Help to understand a Script. Emptyby flyingKatze Fri Oct 13, 2023 10:20 pm

» Fallout New Vegas ENB problem
Help to understand a Script. Emptyby Darnexx Tue Oct 10, 2023 11:40 am

» Starfield
Help to understand a Script. Emptyby Yuri.a.r Wed Oct 04, 2023 10:12 am

December 2023
MonTueWedThuFriSatSun
    123
45678910
11121314151617
18192021222324
25262728293031
CalendarCalendar
_
December 2023
MonTueWedThuFriSatSun
    123
45678910
11121314151617
18192021222324
25262728293031
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 5: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

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

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