kieranh7 Posted February 22, 2012 Share Posted February 22, 2012 Hey fellas, Stuck on a small script, courtesy of game mechanics, and I was wondering if anyone knows of a possible work-around for it ? This specific script basically alters the speed mult for a set period in seconds for a sprint-type ability, but due to the restraint on pc running-speed updating it wont trigger unless the pc either sprints, or crouches (same as when used via console player.setav speedmult XX), but i'm trying to get it to dynamically update, based on the effect duration, ie effect kicks in, then runs out, aposed to having to manually sneak etc each time to trigger. Any help is greatly appreciated, code below. Thanks. bool bIsFinishing = False Event OnEffectStart(Actor Target, Actor Caster) RegisterForUpdate(1) Game.GetPlayer().ModActorValue("SpeedMult", 500) Game.GetPlayer().IsSprinting() Game.GetPlayer().IsRunning() EndEvent Event OnEffectFinish(Actor Target, Actor Caster) bIsFinishing = True RegisterForUpdate(1) Game.GetPlayer().ModActorValue("SpeedMult", -500) Game.GetPlayer().IsSprinting() Game.GetPlayer().IsRunning() endevent I added in the Update register, and isSprinting,Running as a bash to try get the game to update speedtype automatically, but it didn't work. Link to comment Share on other sites More sharing options...
eltucu Posted February 22, 2012 Share Posted February 22, 2012 (edited) I know nothing about Papyrus, just common programming concepts (lil bit of ada and lil bit of c++) but i think you're using stuff there that doesnt does what you think it does http://www.creationkit.com/OnUpdate_-_Formhttp://www.creationkit.com/RegisterForUpdate_-_Form That registerforupdate does nothing since you dont have a OnUpdate event there (or maybe you didnt quoted the entire sources). And these two lines are doing nothing if im not mistaken: Game.GetPlayer().IsSprinting()Game.GetPlayer().IsRunning() You're just asking "Is the player sprinting?" it returns a boolean (true/false) then doing nothing with that boolean. And then asking "is the player running?" and doing nothing with that again. The only two things that are doing something there are the bIsFinishing = true and the two ModActorValue. Having said all that, i dont know how to do what you're asking. Im guessing that the game updates the actor speed value when the player changes their type of movement (walking to running, sprinting to walking, etc), not in between them. At first glance that seems kinda out of reach for Papyrus (forcefully update the current actor movement speed) but as i said, i know nothing bout it so i may be wrong. Maybe you can artificially change the sprinting or running checks for a sec so the game updates the speed values right there. EDIT: Maybe you can do it with SKSE or ScriptDragon. I think that those can set key presses. Just make the script press the sprint button for half a second for the game to update the current speed value. Seems overly complex just for doing that, maybe some ppl with experience can point out other solutions. Edited February 22, 2012 by eltucu Link to comment Share on other sites More sharing options...
Borgut1337 Posted February 22, 2012 Share Posted February 22, 2012 Add a secondary effect to the spell which when it starts adds for example 0.01 to carry weight and when it ends removes 0.01 from carry weight again. Changing carry weight makes the game update speed, and using a small magnitude like 0.01 will ensure you don't actually affect gameplay (due to round MAYBE the actor will sometimes get or lose 1 point of carry weight, but that seems like a reasonable trade-off) Link to comment Share on other sites More sharing options...
jaysus Posted February 22, 2012 Share Posted February 22, 2012 erm not sure if that the problem, not in the mood to think logicially atm :Dbut -500 != /500 speedmultiplier 500 = speed x (+500)speedmultiplier -500 = speed x (-500) a x (-b) is simply not equal to a / b hence your speed does not get reset, as in reverting the multiply, but becomes somin else Link to comment Share on other sites More sharing options...
kieranh7 Posted February 22, 2012 Author Share Posted February 22, 2012 (edited) Thanks very much for all replies fellas, Sorry about the rubbish script lines, I was throwing stuff in there randomly by the end, to see if it helped lol. Going to try all suggestions, very much appreciated. I'll report back if they work. @Jaysus, Its ok mate, tested it, works fine reverting to normal, as its Mod actor value, instead of 'Set', so it just modifies the speed val by 500, even though im using the speedmult, it doesn't alter the multiplier. Thanks for the help. Thanks a lot. Edit: Borgut1337 , your idea worked perfectly, great thinking there I must say. Will include your help on the credits of the mod, Thanks a lot guys for the help. Now, I just need to find out what the papyrus syntax is for 'player.SetGS fjumpheightmin' for a jump ability, tried the AV type of it which is jumpingBonus, but that doesn't work, can't seem to find it anywhere on the CK wiki. Edited February 22, 2012 by kieranh7 Link to comment Share on other sites More sharing options...
Borgut1337 Posted February 22, 2012 Share Posted February 22, 2012 Thanks very much for all replies fellas, Sorry about the rubbish script lines, I was throwing stuff in there randomly by the end, to see if it helped lol. Going to try all suggestions, very much appreciated. I'll report back if they work. @Jaysus, Its ok mate, tested it, works fine reverting to normal, as its Mod actor value, instead of 'Set', so it just modifies the speed val by 500, even though im using the speedmult, it doesn't alter the multiplier. Thanks for the help. Thanks a lot. Edit: Borgut1337 , your idea worked perfectly, great thinking there I must say. Will include your help on the credits of the mod, Thanks a lot guys for the help. Now, I just need to find out what the papyrus syntax is for 'player.SetGS fjumpheightmin' for a jump ability, tried the AV type of it which is jumpingBonus, but that doesn't work, can't seem to find it anywhere on the CK wiki. No need to put me in credits, I didn't come up with it myself, I just followed this thread on bethsoft forums when it was active: http://forums.bethsoft.com/topic/1333531-ive-made-a-fortify-speed-spell-but-theres-a-bit-of-an-issue/page__hl__speed Link to comment Share on other sites More sharing options...
kieranh7 Posted February 22, 2012 Author Share Posted February 22, 2012 (edited) Thanks very much for all replies fellas, Sorry about the rubbish script lines, I was throwing stuff in there randomly by the end, to see if it helped lol. Going to try all suggestions, very much appreciated. I'll report back if they work. @Jaysus, Its ok mate, tested it, works fine reverting to normal, as its Mod actor value, instead of 'Set', so it just modifies the speed val by 500, even though im using the speedmult, it doesn't alter the multiplier. Thanks for the help. Thanks a lot. Edit: Borgut1337 , your idea worked perfectly, great thinking there I must say. Will include your help on the credits of the mod, Thanks a lot guys for the help. Now, I just need to find out what the papyrus syntax is for 'player.SetGS fjumpheightmin' for a jump ability, tried the AV type of it which is jumpingBonus, but that doesn't work, can't seem to find it anywhere on the CK wiki. No need to put me in credits, I didn't come up with it myself, I just followed this thread on bethsoft forums when it was active: http://forums.bethsoft.com/topic/1333531-ive-made-a-fortify-speed-spell-but-theres-a-bit-of-an-issue/page__hl__speed Even so, thanks a lot. Didn't want to make another thread just for this one question. Does anyone know the papyrus syntax for SetGS? ie 'Player.SetGS fJumpHeightMin 300' for example. I've tried various guesses at it, such as ofc Game.GetPlayer().SetGS("fJumpHeightMin", 500) which is not a defined function, tried modAV, SetGravityScale(which was a guess). Tried SetGameSetting, Can't find it on CK wiki either. If anyone knows, and can let me know it would be very much appreciated. Thanks a lot. Edited February 22, 2012 by kieranh7 Link to comment Share on other sites More sharing options...
Borgut1337 Posted February 23, 2012 Share Posted February 23, 2012 Didn't want to make another thread just for this one question. Does anyone know the papyrus syntax for SetGS? ie 'Player.SetGS fJumpHeightMin 300' for example. I've tried various guesses at it, such as ofc Game.GetPlayer().SetGS("fJumpHeightMin", 500) which is not a defined function, tried modAV, SetGravityScale(which was a guess). Tried SetGameSetting, Can't find it on CK wiki either. If anyone knows, and can let me know it would be very much appreciated. Thanks a lot. There isn't any function for that. I know it's weird and it sucks, but will probably have to wait for the SKSE guys to implement it Link to comment Share on other sites More sharing options...
kieranh7 Posted February 23, 2012 Author Share Posted February 23, 2012 (edited) Ahh, well at least now I know why I couldn't find it anywhere lol. Thanks again for your help mate. Didn't bother wait for the jump ability implementation anyway. Just released V1.0 of the mod. :) The Vampire Effects Project Edited February 23, 2012 by kieranh7 Link to comment Share on other sites More sharing options...
Recommended Posts