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
khan Mask Superpele vault dead Gear clone hunk boom leon Metal NPCs boomers ghoul commonwealth power marvel ghost Ryse riot suit body Duty space money Reforged
Latest topics
» OICW Mod for New Vegas
Help to understand a Script. Emptyby DavidW75 Wed Oct 23, 2024 12:37 am

» Looking for Gta 5 xbox one modded account
Help to understand a Script. Emptyby salman0786 Tue Oct 08, 2024 4:47 pm

» [FNV] Flickering Landscape Textures
Help to understand a Script. Emptyby zliu313 Fri Oct 04, 2024 2:33 pm

» Best Site Ever!
Help to understand a Script. Emptyby WasteNinja88 Sun Sep 29, 2024 5:38 am

» Weird bug or glitch with Console Command. [FNV]
Help to understand a Script. Emptyby nickenicole47 Tue Sep 24, 2024 7:11 pm

» Suggestions on npc mod that Blends with dragbodys mod?
Help to understand a Script. Emptyby ilovebees.com Sun Sep 22, 2024 6:31 am

» [FNV] Right Mouse Button Zoom/ADS Bug
Help to understand a Script. Emptyby Lankychazz2009 Sun Sep 22, 2024 4:20 am

» (FO4) FO76 BOS Objects
Help to understand a Script. Emptyby campesino.p Sat Sep 21, 2024 9:53 pm

» [FNV] Dragbody's FO4 Power Armors bug.
Help to understand a Script. Emptyby Lankychazz2009 Thu Sep 19, 2024 2:34 pm

» Fallout: New Vegas "Pizza Boy" Mod
Help to understand a Script. Emptyby MrMistyEyed2 Tue Sep 10, 2024 1:15 am

» Here Are Some Of The Best Mods From GunNetwork
Help to understand a Script. Emptyby Abyssfer Sun Sep 08, 2024 10:02 am

» Saying hi after two years
Help to understand a Script. Emptyby spiralsandspirals Thu Aug 29, 2024 12:39 am

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

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

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

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

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

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

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

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

November 2024
MonTueWedThuFriSatSun
    123
45678910
11121314151617
18192021222324
252627282930 
CalendarCalendar
_
November 2024
MonTueWedThuFriSatSun
    123
45678910
11121314151617
18192021222324
252627282930 
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

-
» Issue with recompiling a script (for TTW)
» [FNV] Need Help With A Script
» Blender Nif Script help
» Weather script for Fallout 3
» Lawbringer perk in companions script need help

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