Jump to content

DOWNLOAD MODS

Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...

LEARN MODDING

Ready to try your hand at making your own mod creations? Visit the Enclave, the original ES/FO modding school, and learn the tricks of the trade from veteran modders...

JOIN THE ALLIANCE

Membership is free and registering unlocks image galleries, project hosting, live chat, unlimited downloads, & more...

Malonn

Allies
  • Posts

    31
  • Joined

  • Last visited

Everything posted by Malonn

  1. ALLLRIGHTY THEN! Something as simple as that. Thanks a million, WillieSea! I spent a whole day trying to figure that out. I was going to give up and try an Event Handler (another goodie from the OBSE people), but you have saved me from that extra scripting. Thanks again, WS.
  2. Thanks, WillieSea. But that won't work. I did think about that. Let me explain the script: Let HighAINPC := ar_Construct Array ---> Initializes an array Let HighAINPC := GetHighActors ---> Sets the array to the function, which returns an array, in which a reference is set as an element for every NPC in the current cell and adjacent surrounding cells. ForEach ActorRef <- HighAINPC ---> Starts a loop that walks through every single element in the array set by "GetHighActors" Let CurrentActor := ActorRef["value"] ---> special function that sets "CurrentActor" to the first ref returned by "GetHighActors" Let TalkingActor := CurrentActor.GetCurrentAIPackage == 6 ---> Sets TalkingActor to the first actor that is talking If TalkingActor Set NPCIsTalking to 1 Endif Loop So, if I were to use the "else" condition, if the very first actor returned by "gethighactors" was talking, but the next actor wasn't, it would set "NPCIsTalking" to 0, even though the first actor may still be talking. What I'm doing is writing a buffer purging script. Because of the bug with that function (thanks Bethesda), if an actor is talking while that function is called, the voice sound get cut off. So all you get is lips moving, but no sound. With this section of script, I'm trying to determine if one or more actors are talking, and when the last actor has stopped talking. When that happens, NPCIsTalking should get set to zero, and the rest of my script will continue, allowing buffers to be purged circumventing the "sound" bug. I understand you are not familiar with OBSE functions and scripting additions, but do you think you could tap into your "real" programming language skills to help. Thanks a bunch
  3. My scripting skills have been maxed. I am trying to iterate through an array, and determine when an NPC is talking. I've managed to do that. I can determine when an NPC is talking, but the problem I am having is that I also want to determine when all the NPC's have stopped talking. I can't figure that out. Here's a snippet from the script where I'm stuck: Let HighAINPC := ar_Construct Array Let HighAINPC := GetHighActors ForEach ActorRef <- HighAINPC Let CurrentActor := ActorRef["value"] Let TalkingActor := CurrentActor.GetCurrentAIPackage == 6 If TalkingActor Set NPCIsTalking to 1 Endif Loop As you can see, I can determine when an NPC is talking, but I can't figure out how to determine when those NPC's found by "GetHighActors" have stopped talking. All I want to do is set "NPCIsTalking" to 0 when there are no more NPC's talking that have been found by "GetHighActors". Any help would be greatly appreciated. The only thing I can guess at for a solution would be to create an array that tracks all the NPC's found by "GetHighActors", and then set a flag if they have stopped talking. That said, I can't figure out how to do that either. And there could be a simpler way. I don't know. Thanks for any help.
  4. Yeah, that was a test post of the script. But, I'm happy to say, with the help of people like you, and QQuix over at the official forums, I got the script to work the way it should. All it took was one little change. Set lCurrentBrightness to GetLightRadius Torch02 Let avCurrentColor := Ar_Construct Array Let avCurrentColor := GetLightRGB Torch02 Let lCurrentRed := avCurrentColor[0] Let lCurrentGreen := avCurrentColor[1] Let lCurrentBlue := avCurrentColor[2] ... Elseif sChoice == 0 Let avCurrentColor[0] := avCurrentColor[0] + 20 SetLightRGB avCurrentColor Torch02 Update3D Set sChoosing to 3 Instead of a separate array for changing the RGB values, I just used the array that retrieves the RGB values. Now both the menu and the color of the torch light changes. Thanks.
  5. Yes, "Let" is from OBSE. It is an assignment command, like "Set". So, no ideas why the script isn't functioning exactly as I'd like it to?
  6. ScriptName MalonnDTMenuScript Short sChoosing Short sChoice Short sCancel Long lCurrentBrightness Long lCurrentRed Long lCurrentGreen Long lCurrentBlue Array_Var avModifyLightColor Array_Var avCurrentColor Begin OnEquip Player Set sChoosing to 1 Set sCancel to 0 End Begin MenuMode Set lCurrentBrightness to GetLightRadius Torch02 Let avModifyLightColor := Ar_Construct Array Let avCurrentColor := Ar_Construct Array Let avCurrentColor := GetLightRGB Torch02 Let lCurrentRed := avCurrentColor[0] Let lCurrentGreen := avCurrentColor[1] Let lCurrentBlue := avCurrentColor[2] If sChoosing == 0 Set sCancel to 1 Elseif sChoosing == 1 MessageBoxEX "Dynamic Torches Menu|Torch Brightness Options|Torch Light Color Options|Exit" Set sChoosing to -1 Set sChoice to -1 Elseif sChoosing == -1 Set sChoice to GetButtonPressed If sChoice == -1 Return Elseif sChoice == 0 Set sChoosing to 2 Elseif sChoice == 1 Set sChoosing to 3 Elseif sChoice == 2 Set sChoosing to 0 Endif Elseif sChoosing == 2 MessageBoxEX "Torch Brightness Options %rBrightness Increments Index: %.0f %rCurrent Brightness: %.0f|Increase Increments|Increase Brightness|Decrease Brightness|Back", aaaMalonnDropLitTorches.lBrightIncr, lCurrentBrightness Set sChoosing to -2 Set sChoice to -1 Elseif sChoosing == -2 Set sChoice to GetButtonPressed If sChoice == -1 Return Elseif sChoice == 0 Set aaaMalonnDropLitTorches.lBrightIncr to aaaMalonnDropLitTorches.lBrightIncr + 10 Set sChoosing to 2 Elseif sChoice == 1 Set lCurrentBrightness to lCurrentBrightness + aaaMalonnDropLitTorches.lBrightIncr SetLightRadius lCurrentBrightness Torch02 Set sChoosing to 2 Elseif sChoice == 2 Set lCurrentBrightness to lCurrentBrightness - aaaMalonnDropLitTorches.lBrightIncr SetLightRadius lCurrentBrightness Torch02 Set sChoosing to 2 Elseif sChoice == 3 Set sChoosing to 1 Endif Elseif sChoosing == 3 MessageBoxEX "Torch Light Coloration Options %rRed Component: %.0f %rGreen Component: %.0f %rBlue Component %.0f|Increase Red|Decrease Red|Increase Green|Decrease Green|Increase Blue|Decrease Blue|Back", lCurrentRed, lCurrentGreen, lCurrentBlue Set sChoosing to -3 Set sChoice to -1 Elseif sChoosing == -3 Set sChoice to GetButtonPressed If sChoice == -1 Return Elseif sChoice == 0 Let avModifyLightColor[0] := 20 SetLightRGB avModifyLightColor Torch02 Update3D Set sChoosing to 3 Elseif sChoice == 1 Let avModifyLightColor[0] := avCurrentColor[0] - 20 SetLightRGB avModifyLightColor Torch02 Set sChoosing to 3 Elseif sChoice == 2 Let avModifyLightColor[1] := avCurrentColor[1] + 20 SetLightRGB avModifyLightColor Torch02 Set sChoosing to 3 Elseif sChoice == 3 Let avModifyLightColor[1] := avCurrentColor[1] - 20 SetLightRGB avModifyLightColor Torch02 Set sChoosing to 3 Elseif sChoice == 4 Let avModifyLightColor[2] := avCurrentColor[2] + 20 SetLightRGB avModifyLightColor Torch02 Set sChoosing to 3 Elseif sChoice == 5 Let avModifyLightColor[2] := avCurrentColor[2] - 20 SetLightRGB avModifyLightColor Torch02 Set sChoosing to 3 Elseif sChoice == 6 Set sChoosing to 2 Endif Endif End Most of it does as I want it to, save a couple things. First, when I adjust any red, green, or blue value, that change is not reflected in the menu. I'm not sure why. Second, the RGB values are not taking effect. This leads me to believe there may be a bigger problem with the script. After some help at the official forums, I found that I needed to use "Update3D" in order for the color changes to take effect. But thy still are not. Any good scripters have an idea as to why??
×
×
  • Create New...