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
money ghoul boomers dead power Superpele daryl Mask body vault boom mandalorian NPCs marvel machine gauss hunk Call Gear Reforged commonwealth riot wolfenstein Ryse Overhaul khan
Latest topics
» The Fallout TV show destroyed NV. I'm done with Todd.
Help to understand a Script. Emptyby SunRonin Today at 3:19 am

» Afterlife discord
Help to understand a Script. Emptyby DionysusDreams Yesterday at 8:02 am

» How to change the UI sound fx placed by a mod?
Help to understand a Script. Emptyby immortallegion Mon May 13, 2024 12:40 am

» big red exclamation marks
Help to understand a Script. Emptyby teslatest Sun May 12, 2024 6:02 pm

» [FNV] Menu and cursor doesnt show up
Help to understand a Script. Emptyby Anesthatic Sat May 11, 2024 10:20 am

» Just a tired engineer with too little free time
Help to understand a Script. Emptyby Allthis Fri May 10, 2024 8:20 pm

» The Next fallout
Help to understand a Script. Emptyby Velken Fri May 10, 2024 5:13 am

» (FO4) FO76 BOS Objects
Help to understand a Script. Emptyby Velken Fri May 10, 2024 5:08 am

» Announcement: The Winds of Change
Help to understand a Script. Emptyby Luke Priefer Thu May 09, 2024 11:16 pm

» Starfield
Help to understand a Script. Emptyby Velken Thu May 09, 2024 4:34 am

» Not new, but been a long time
Help to understand a Script. Emptyby john96 Sat May 04, 2024 5:31 am

» Hey everyone, I've missed this place so much.
Help to understand a Script. Emptyby Xehonort Wed May 01, 2024 6:33 pm

» Hello, can anyone help me with the load order?
Help to understand a Script. Emptyby Elean Tue Apr 30, 2024 2:21 pm

» Hey guys!!!
Help to understand a Script. Emptyby SilverInc Sun Apr 28, 2024 5:39 pm

» The Legion are fascists, let's discuss it.
Help to understand a Script. Emptyby monke gaming Sat Apr 27, 2024 7:56 am

» A long overdue introduction
Help to understand a Script. Emptyby Athallah Akbar Thu Apr 25, 2024 4:46 pm

» (Fo4) fo76 Steel Dawn Weapons and Armor ports
Help to understand a Script. Emptyby Nicward Sat Apr 20, 2024 9:50 pm

» 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

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

May 2024
MonTueWedThuFriSatSun
  12345
6789101112
13141516171819
20212223242526
2728293031  
CalendarCalendar
_
May 2024
MonTueWedThuFriSatSun
  12345
6789101112
13141516171819
20212223242526
2728293031  
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

-
» BACK TO GUNETWORK / PLEASE HELP / I KNOW UNDERSTAND MY
» [FNV] Need Help With A Script
» Blender Nif Script help
» Issue with recompiling a script (for TTW)
» Weather script for Fallout 3

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