competentfake Posted November 8, 2010 Author Share Posted November 8, 2010 Damn, damn. Not done bugging you. : ( Do I have to run the set xSKILL to player.getpermav SKILL just once, at the beginning of the script, or do I have to repeat it for every perk elseif? Same for xSPECIAL. Link to comment Share on other sites More sharing options...
gsmanners Posted November 8, 2010 Share Posted November 8, 2010 Once again, how often do you need that variable set? Think about it. What is the use case of your code there? Would this be an issue? You're the coder, not me. Link to comment Share on other sites More sharing options...
hayst Posted November 8, 2010 Share Posted November 8, 2010 OHHH! I get it, the original author put the 'set xSKILL' commands outside of the Begin/End block, so you'd have to restart the game for it to scan your xSKILL levels again (I had wondered why I didn't immediately recieve perks when I reached the skill level thresholds). I misunderstood you, I thought you were saying the variable declarations should be inside the Begin block, sorry. Got a lot rattling around in the ol' noggin. Thank you again for your help, I think (I hope) I have everything I need. <3~Fake begin GameMode ;-----------------------------------------------------------------------BARTER set xBARTER to player.GetPermAV Barter set xEndurance to player.GetPermAV Endurance if xBARTER >= 60 if player.HasPerk LongHaul == 0 if player.GetLevel >= 12 if xEndurance >= 6 ShowMessage xSkillPerkMSG011 ShowMessage xSkillTrade set ButtonVar to GetButtonPressed if ButtonVar == -1 return elseif ButtonVar == 0 player.AddPerk LongHaul elseif ButtonVar == 1 player.ModAV Barter 5 endif endif endif endif endifBOOSH! *light bulb* That's what he meant by not being able to call reference functions directly by calling the function explicitly, you have to set a variable to refer to that function instead, which, I think is what he meant by an implicit reference. Yay. First off, I quite like the idea behind your mod, sort of an alternate to the Tag! Perk. One comment on the scripting though where you're checking the button result: it's always good practice to have a "fall-through" condition, just in case something unpredictable happens. In this case, I'd write the button result as follows: if ButtonVar == -1 return elseif ButtonVar == 0 player.AddPerk LongHaul else player.ModAV Barter 5 endif I'm not fully au fait with the F:NV scripting grammar as yet so the "else" might be little different, but otherwise should treat you well. Link to comment Share on other sites More sharing options...
competentfake Posted November 8, 2010 Author Share Posted November 8, 2010 @gsmanners: What seems logical to me is that if scripts get run once every few seconds, I would only have to set the variable once, as any changes to it will be recompiled and adjusted on the next run-through. @hayst: Thanks! I'll make the change. I haven't been able to find -any- evidence that the New Vegas GECK scripting language has changed in any significant way from FO3, so I've just been muddling along through the ever-so-intutitive (eyeroll) GECK wiki. Link to comment Share on other sites More sharing options...
competentfake Posted November 9, 2010 Author Share Posted November 9, 2010 Okay, I've hit another snag, hopefully someone can help. I got sidetracked, and created a mod (well, a piece of a mod) that causes those with the Friend of the Night perk to have blurred vision in daylight unless they're wearing shades/visored helmet/tinted goggled hat/etc. It works just fine, the only problem is that it takes a couple seconds for the blur to kick in or turn off, and the transition is abrupt. I see a lot of 'Fadein/Fadeout' imagespace modifiers, but I haven't a clue how to make them work, or which one I would need to use. A temporary fix will be to use ShowMessage to pop up a dialog box telling the player that their eyes are adjusting poorly to the light, or the shades cut the glare enough so they can see, and hopefully while they're looking at the message, the game will load/unload the blurred vision, but I hate having to click 'OK' when something like that happens, it ruins the immersion, thereby lessening the realism I'm hoping the mod will inspire. Anyone have any ideas how to make imagespace modifiers fade in and out? Thanks! ~Fake Link to comment Share on other sites More sharing options...
Recommended Posts