oyayeboo Posted March 3, 2013 Share Posted March 3, 2013 heya!i'm making my own little combat overhaul mod (yeah, i dont like all those existing mods for different reasons :P) and i'm stuck with speedmult actor value.The problem is - changed value doesn't come in action instantly. In my mod speedmult depends on stamina percentage (at 0-30% stamina speedmult is (base speedmult)/2, at 80-100% stamina speedmult isn't altered and at 30-80% stamina speedmult is lowered by 1 for each percent of stamina loss under 80%). And the biggest disappointment is that movement speed is calculated from speedmult only when you switch to walk/run, block, attack or do-whatever-else-than-running. This results in actors running at 50% speed with higher than 30% stamina, unless they take any action. Does anyone knows any workarounds? :( Link to comment Share on other sites More sharing options...
portbash Posted June 22, 2014 Share Posted June 22, 2014 I'll bump this one as I got the same problem: Speedmult manipulations are only applied/updated if player does some certain action (draw weapon, sneak...). What's the trick? I've seen speed altering in other mods working just fine... Link to comment Share on other sites More sharing options...
SunDoWneR667 Posted June 22, 2014 Share Posted June 22, 2014 I'm not an expert, but if you want to keep track of something all the time maybe a "Quest" would do the trick? QuestStage 10 = 80-100% StaminaQuestStage 20 = 79-30% Staminaetc, and then do an If statement If Stamina >= 79% SetStage 20 in Stage 20 do your Speedmult thingie... Maybe it helps, you have to get the right syntax though. Cheers Sunny Link to comment Share on other sites More sharing options...
Ceruulean Posted June 22, 2014 Share Posted June 22, 2014 (edited) Actually, this topic has the same problem as you: http://forums.nexusmods.com/index.php?/topic/1826810-need-more-script-help-changing-a-game-setting-on-trigger-enter/ Just to quote: On 6/22/2014 at 1:09 AM, Kyle8497 said: So, I collectively took the given advice and produced this new script, which is still not working. Actually, it does work, but it only works if I have my sword out. My character must walk over the trigger box area with their sword out, come to a complete stop, then walk again and their actor value will be changed. What can be done about this? Some kind of update interval or something?Scriptname SpikyGrassSlowen extends ObjectReference String SpeedMult Event OnTriggerEnter(ObjectReference akActionRef) if akActionRef == Game.GetPlayer() Game.GetPlayer().SetActorValue("SpeedMult", 50.0) EndIf EndEvent Event OnTriggerLeave(ObjectReference akActionRef) if akActionRef == Game.GetPlayer() Game.GetPlayer().SetActorValue("SpeedMult", 100.0) EndIf EndEvent To which I replied that he should use a magic effect, since it does not require any animation changes. Somehow the scripted method just doesn't want to work fluidly: On 6/22/2014 at 2:44 AM, Ceruulean said: I honestly think you should try making a spell and magic effect, as lofgren suggests. Copy the "Slow" effects from the ice spells, remove the art shaders and sounds, make sure the "Recover," "Detrimental" checkboxes are ticked, although you may want to untick "Hostile." Change the spell from "Aimed/Target" to "Self," and "Concentration/Fire and Forget" to a "Constant Effect." Then in the spell window, set the magnitude anywhere from 1 to 100, with 50 being 50% slower. Use the script to add the spell upon entering, and removing the spell upon leaving.Scriptname SpikyGrassSlowen extends ObjectReference Spell Property SlowSpell Auto Event OnTriggerEnter(ObjectReference akActionRef) if akActionRef == Game.GetPlayer() Game.GetPlayer().AddSpell(SlowSpell, false) ;The 'false' parameter prevents a UI message from popping up that says, 'Spell Added' in the upper corner EndIf EndEvent Event OnTriggerLeave(ObjectReference akActionRef) if akActionRef == Game.GetPlayer() Game.GetPlayer().RemoveSpell(SlowSpell) ; No message will appear from removing a spell. EndIf EndEventIt'll work just like the player had a frost spell cast on them, except if it is a Constant Effect spell there is no set duration for the debuff, only when you decide to remove it. There's no point going through the whole "Playidle" business; it's excessive. Edited June 22, 2014 by Ceruulean Link to comment Share on other sites More sharing options...
portbash Posted June 22, 2014 Share Posted June 22, 2014 I am using a (constant) magic effect! still the player has to draw the weapon or do other actions to make the new speedmult value kick in. I'll check out & reverse an ice spell... good idea. Thx @Sunny: Thx mate but I'm just having difficulties to get the speedmult updated. Not messing with stamina and such. But thx for the effort. Link to comment Share on other sites More sharing options...
SunDoWneR667 Posted June 22, 2014 Share Posted June 22, 2014 (edited) Maybe you can use the SKSE Event "OnKeyDown"-> http://www.creationkit.com/OnKeyDown_-_Form ? If I press WSAD -> Do something Edited June 22, 2014 by SunDoWneR667 Link to comment Share on other sites More sharing options...
portbash Posted June 22, 2014 Share Posted June 22, 2014 (edited) Well... not even the original ice/slow spells are doing the trick. something ain't right. @sunny: Yeah I might need to create a workaround using SKSE... Right now I'm using the following hack: while player.isWeaponDrawn() == false player.drawWeapon() wait(0.0001) endwhile while player.isWeaponDrawn() == true player.SheatheWeapon() wait(0.1) endwhileBut there is a tiny moment where the weapon is shown - sucks. Going to try it with sneaking instead. Edited June 22, 2014 by portbash Link to comment Share on other sites More sharing options...
Ceruulean Posted June 22, 2014 Share Posted June 22, 2014 Heh, that is weird. I found this mod that seems to have a solution, as it acknowledges the same problems: Frost Magic Bugfixes Link to comment Share on other sites More sharing options...
portbash Posted June 23, 2014 Share Posted June 23, 2014 (edited) I'll check it out. Thx a lot Ceru! EDIT: From the mod description (Author WizardWhitenoise) Quote So what this mod does is changes the slow effects used by frost spells into script effects. The scripts resolve this issue by causing a temporary 1 lb change in inventoryweight (which is reversed at the end of the effect) just slightly after the speedmult change is applied, in order to force the game to recalculate effective run speed. The removal of this weight at the end accomplishes the same thing, recalculating the actor's actual runspeed when their speedmult is returned to 100. Edited June 23, 2014 by portbash Link to comment Share on other sites More sharing options...
portbash Posted June 23, 2014 Share Posted June 23, 2014 (edited) CONFIRMED & SOLVED Manipulating the InventoryWeight actor value will update the SpeedMult value! Download & endorse: Frost Magic Bugfixes Edited June 23, 2014 by portbash Link to comment Share on other sites More sharing options...
Recommended Posts