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

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Malonn's Achievements

Apprentice

Apprentice (3/11)

1

Reputation

  1. What would be the best way to boost weapon damage by a certain percent? Keep in mind the formula. Math never was my strong suit.
  2. Figured it out with a little help. Nevermind.
  3. Hi, I'm stuck. I've a function script that checks to see if the player is wearing all of one type of armor (light or heavy). If the player is wearing all one type, the scripts then boost the armor rating by 20%. No problem. I've got that working. My problem is if the player changes 1 or more armor pieces, I want to boost those new pieces by 20% too, without adding 20% more of a boost to the armor that didn't get changed (so already has a 20% boost). Here's the complete set boosting script: ScriptName FnBoostArmorRating Array_var avTempB Array_var avBoostEquip Ref rCurBoost Float fRating Float fBoost Begin Function { } Let avTempB := ar_Construct StringMap Let avBoostEquip := Player.GetEquippedItems ForEach avTempB <- avBoostEquip Let rCurBoost := avTempB["value"] If IsArmor rCurBoost == 1 Let fRating := GetArmorAR rCurBoost Let fBoost := fRating * 0.20 Player.ModArmorAR fBoost rCurBoost Endif Loop End Any ideas? Thanks.
  4. Hey, I was surprised to see this old thread. Thanks for the help. I managed to get it written in another way. Thanks though.
  5. Good, good. Great to hear about the water. Yeah, I wasn't sure what to think when I saw a torch lit when it first hit the water. I think it has to do with dropping it from the player inventory or something. If the torch is equipped and one walks into the water, it goes out. But if it's a torch that has been dropped via the "Drop" script function it won't go out. **shrug** Ah well. Thanks to you it doesn't matter cuz it now goes out when it's supposed to.
  6. That did more than help, syscrusher, it solved my problem. By getting the cell's water height and checking that against the torch's height, the torch now goes out when entering water. I haven't thoroughly tested, but I wonder what would happen in an interior cell that has water above the lowest point?? It wouldn't function as intended in that case I suspect. I hope there are no cells like that. Do you know of any? There could be a pool of water, and later sections of the cell slope downhill or have steps going down into the dungeon. Don't know, but for now, all is good. THANKS.
  7. How can I determine if an object is in water? Not an actor, but a torch dropped to the ground. I tried "IsSwimming" with the torch and it didn't work. The player doesn't need to be in the water. Sometimes a cell has water and the dropped torch slides into the water. I want it to extinguish when that happens. Extinguishing flames is simple. But I'm having trouble figuring out how to determine when the torch slips into the water.
  8. OBSE. OBSE features a function called "SetLightRadius". Just used that.
  9. I figured it out. Just had to unequip and re-equip the torch to show the radius adjustment.
  10. I'm trying to adjust the light radius of a torch via script. I can do it, but the problem I'm having is it doesn't show immediately in-game. You have to open a menu then go back to the regular mode for the light changes to be seen. I've tried using "Update3D" but doesn't seem to help. I'm trying to adjust the light raius of a torch on the ly via key presses. It's all good to go, except it doesn't show immediately. You have to go to menu mode then back to gameplay mode for the light change to show. Anyone have any ideas??
  11. I'm a little late here, but I'll reply anyway. Great suggestions, jamochawoke. I ended up using the fatigue suggestion for a different part of the script. To just knock someone down I prefer "PushActorAway" because they get right back up, no need to worry about adjusting fatigue. But a different section of the script called for an actor to be knocked out, that is where I used your suggestion. I did it with pure scripting, no spells, but still... Anyway, thanks.
  12. Great suggestion, syscrusher. I hadn't thought about a spell. But, in the time between asking for help and this answer I was able to figure out a pure scripting way to make an NPC fall down (plus I was thinking with a paralyze effect the NPC will freeze and fall; with my way the NPC crumbles with physics to the cround). The solution I found, for those interested, was to use the "PushActorAway" function. Double up on the reference when setting the function and set the force parameter to a negative number. This forces the NPC/creature to fall to the ground and then get right on back up. Thanks again, though.
  13. What's the easiest way to force an NPC to fall down in a script. Am I missing a easy way to do it via a function that I've overlooked? I couldn't find anything. Currently I've been messing with idle animations, but that has been a little wonky. Any help would be appreciated.
  14. I got it working by placing the stagger.kf animation file into the "_male" directory. Now when calling a NPC to stagger via script it works even if they are not in an alert state. Idle states now work.
  15. I've got a question that's really baking my brain. Probably simple to an experienced scripter. Well, here it is: How can I track how many times I hit an NPC with a bash? I wrote a simple push/shield bash script, and I want to track how many times I hit any given NPC with the bash/push. If they are pushed 3 times within a certain time frame, they attack. I'm really having trouble tracking the NPC's because I could push one NPC twice, then go to another NPC and push him/her once, then go to another NPC and push him/her three times. The script needs to track those individuals and the number of times they've been pushed/bashed. The script should only track 10 or so NPC's so it doesn't get out of control. Anything over 10 resets the thing. Can this be done simply? I can't figure out how to do it. EDIT: Okay. I buckled down and strapped on my thinking cap and figured out a way to do what I was asking for help to do. It strikes me as rough and clumsy. Just not elegant. Here's the script: ScriptName MalonnPushScript Short sNPCReset Short sKeyVar Short sStaggerVar Short sCountReset Short sCounter1 Short sCounter2 Short sCounter3 Short sCounter4 Short sCounter5 Float fQuestDelayTime Float fAnimDelay Ref rCrossRef Ref rShield Ref rNPC Ref rNPC2 Ref rNPC3 Ref rNPC4 Ref rNPC5 Begin GameMode If fQuestDelayTime != 0.10 Let fQuestDelayTime := 0.10 Endif Let rCrossRef := GetCrosshairRef Let rShield := Player.GetEquippedObject 13 If rCrossRef.GetObjectType == 35 If sNPCReset == 0 Let rNPC := rCrossRef Let sNPCReset := 1 If sCountReset == 1 Let sCounter1 := 0 Let sCountReset := 2 Endif Endif If rNPC != rCrossRef If sNPCReset == 1 Let rNPC2 := rCrossRef Let sNPCReset := 2 If sCountReset == 2 Let sCounter2 := 0 Let sCountReset := 3 Endif Endif Endif If rNPC != rCrossRef && rNPC2 != rCrossRef If sNPCReset == 2 Let rNPC3 := rCrossRef Let sNPCReset := 3 If sCountReset == 3 Let sCounter3 := 0 Let sCountReset := 4 Endif Endif Endif If rNPC != rCrossRef && rNPC2 != rCrossRef && rNPC3 != rCrossRef If sNPCReset == 3 Let rNPC4 := rCrossRef Let sNPCReset := 4 If sCountReset == 4 Let sCounter4 := 0 Let sCountReset := 5 Endif Endif Endif If rNPC != rCrossRef && rNPC2 != rCrossRef && rNPC3 != rCrossRef && rNPC4 != rCrossRef If sNPCReset == 4 Let rNPC5 := rCrossRef Let sNPCReset := 5 If sCountReset == 5 Let sCounter5 := 0 Let sCountReset := 6 Endif Endif Endif If rNPC != rCrossRef && rNPC2 != rCrossRef && rNPC3 != rCrossRef && rNPC4 != rCrossRef && rNPC5 != rCrossRef Let sNPCReset := 0 Let sCountReset := 1 Endif Endif If IsKeyPressed3 33 == 1 && sKeyVar == 0 Let sKeyVar := 1 If Player.IsWeaponOut == 1 If Player.IsShieldOut == 1 Player.PlayGroup BlockAttack 1 Player.PlayGroup Idle 0 Let sStaggerVar := 1 If Player.GetActorValue Fatigue >= 10 Player.ModActorValue2 Fatigue -10 Endif Else Player.PlayGroup CastTouch 1 Player.PlayGroup Idle 0 Let sStaggerVar := 1 PlaySound WPNSwishHand If Player.GetActorValue Fatigue >= 10 Player.ModActorValue2 Fatigue -10 Endif Endif Elseif Player.GetEquipped rShield == 1 && Player.IsWeaponOut == 0 && Player.GetWeaponAnimType <= 1 Player.PlayGroup BlockAttack 1 Player.PlayGroup Idle 0 Let sStaggerVar := 1 If Player.GetActorValue Fatigue >= 10 Player.ModActorValue2 Fatigue -10 Endif Else Player.PlayGroup CastTouchAlt 1 Player.PlayGroup Idle 0 Let sStaggerVar := 1 PlaySound WPNSwishHand If Player.GetActorValue Fatigue >= 10 Player.ModActorValue2 Fatigue -10 Endif Endif Elseif IsKeyPressed3 33 == 0 && sKeyVar == 1 Let sKeyVar := 0 Endif If rCrossRef.IsActor == 1 If sStaggerVar == 1 Let fAnimDelay += GetSecondsPassed If fAnimDelay >= 0.6 rCrossRef.PlayGroup Stagger 1 Let sStaggerVar := 0 Let fAnimDelay := 0 rCrossRef.ModDisposition Player -10 If rCrossRef.IsGuard == 1 Player.ModCrimeGold 1000 Endif If rCrossRef == rNPC Let sCounter1 += 1 Elseif rCrossRef == rNPC2 Let sCounter2 += 1 Elseif rCrossRef == rNPC3 Let sCounter3 += 1 Elseif rCrossRef == rNPC4 Let sCounter4 += 1 Elseif rCrossRef == rNPC5 Let sCounter5 += 1 Endif Endif Endif Else Let sStaggerVar := 0 Let fAnimDelay := 0 Endif If sCounter1 >= 3 rNPC.StartCombat Player Let sCounter1 := 0 Elseif sCounter2 >= 3 rNPC2.StartCombat Player Let sCounter2 := 0 Elseif sCounter3 >= 3 rNPC3.StartCombat Player Let sCounter3 := 0 Elseif sCounter4 >= 3 rNPC4.StartCombat Player Let sCounter4 := 0 Elseif sCounter5 >= 3 rNPC5.StartCombat Player Let sCounter5 := 0 Endif End That's the full script that does what I want. Is there a more efficient way? I'm satisfied enough, I suppose. But insight is always welcome.
×
×
  • Create New...