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
Superpele wolfenstein Overhaul Gear commonwealth Call vault money Ryse FCOM boom khan Mask riot Armor Reforged marvel dead daryl body NPCs hunk boomers mandalorian machine ghoul
Latest topics
» Howdy from grandmastoes
Help to understand a Script. Emptyby Apoc Tue Apr 16, 2024 11:06 pm

» armor slot changing in creation kit
Help to understand a Script. Emptyby Meno Tue Apr 16, 2024 1:22 pm

» The Fallout TV show destroyed NV. I'm done with Todd.
Help to understand a Script. Emptyby gavin gold Tue Apr 16, 2024 1:22 pm

» {Multi Choice POLL} Fallout 3 or Fallout NV music?
Help to understand a Script. Emptyby HardComma Thu Apr 11, 2024 12:42 am

» Hello from nexus
Help to understand a Script. Emptyby noacctname1 Wed Apr 10, 2024 6:54 am

» Who Would Win: Ulysses or Joshua Graham?
Help to understand a Script. Emptyby BellToadTall Wed Apr 03, 2024 9:06 pm

» The Next fallout
Help to understand a Script. Emptyby BellToadTall Wed Apr 03, 2024 9:01 pm

» Your favorite mods for F:NV
Help to understand a Script. Emptyby BellToadTall Wed Apr 03, 2024 8:55 pm

» Whats the Number 1 mod you really want? (NV)
Help to understand a Script. Emptyby CosmoMods Tue Apr 02, 2024 1:52 am

» Unpopular Opinion: Too many mods ruin the game
Help to understand a Script. Emptyby Evmeister Sun Mar 31, 2024 4:11 pm

» Guns you want in Fallout
Help to understand a Script. Emptyby Lupinboi Wed Mar 27, 2024 12:21 am

» black doors in sierra madre bug
Help to understand a Script. Emptyby Wɪmzɪkl Wed Mar 20, 2024 1:27 pm

» Any Titanfall mods out their that have the female sniper armor?
Help to understand a Script. Emptyby john96 Wed Mar 20, 2024 8:14 am

» Modder looking for gun mods
Help to understand a Script. Emptyby Bset Sun Mar 17, 2024 11:33 am

» schorched enclave officer
Help to understand a Script. Emptyby Smash96 Sun Mar 17, 2024 10:13 am

» Sup everyone (link funny shorts here)
Help to understand a Script. Emptyby DHB00P Thu Mar 14, 2024 7:29 am

» Late Introduction
Help to understand a Script. Emptyby Battleclad Sat Mar 02, 2024 9:29 pm

» Greetings!
Help to understand a Script. Emptyby Primus_Daibhidh Thu Feb 29, 2024 2:01 pm

» Fallout New Vegas Stuttering And LOD Problems
Help to understand a Script. Emptyby gamerdude7892 Thu Feb 29, 2024 12:48 am

» hello, here for porting tips and tricks to fnv
Help to understand a Script. Emptyby uxof Mon Feb 26, 2024 9:50 am

April 2024
MonTueWedThuFriSatSun
1234567
891011121314
15161718192021
22232425262728
2930     
CalendarCalendar
_
April 2024
MonTueWedThuFriSatSun
1234567
891011121314
15161718192021
22232425262728
2930     
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 9: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-