Blue Astra Posted April 23, 2020 Share Posted April 23, 2020 So I've been playing around with DD and when wearing heels/boot there is sometimes a chance your character will trip and fall. In reality what happens is you run along, come to a complete stop, a pretty simple/boring animation plays, and then you continue on your merry way. You don't even have to be moving for the trip event to happen. I was wondering if this animation could be replace with the "pushactoraway player X" console command. If you enter that command into your console whilst playing, your character will ragdoll. I found that "pushactoraway player 3" is a reasonable amount of force. I've looked at the script source file things and found in zadLibs.psc and found the following code, Spoiler Function Trip(actor akActor) ; this should delay any anims if there is a menu open Utility.Wait(0.1) ; don't play anims if the actor is already in one. If IsAnimating(akActor) return EndIf ; don't play the animation in combat if it's the player if akActor == playerref && playerref.IsInCombat() return Endif ; use PlayThirdPersonAnimation instead of StartThirdPersonAnimation for non-looping animation ; alternatively EndThirdPersonAnimation can be called manually if termination is conditional If !akActor.WornHasKeyword(zad_DeviousHeavyBondage) PlayThirdPersonAnimation(akActor, "ft_fall_over_reg_1", 5, true) Elseif akActor.WornHasKeyword(zad_DeviousArmBinder) PlayThirdPersonAnimation(akActor, "ft_fall_over_armbinder_1", 5, true) Elseif akActor.WornHasKeyword(zad_DeviousArmBinderElbow) PlayThirdPersonAnimation(akActor, "ft_fall_over_elbowbinder_1", 5, true) Elseif akActor.WornHasKeyword(zad_DeviousYokeBB) PlayThirdPersonAnimation(akActor, "ft_fall_over_bbyoke_1", 5, true) Elseif akActor.WornHasKeyword(zad_DeviousCuffsFront) PlayThirdPersonAnimation(akActor, "ft_fall_over_frontcuffs_1", 5, true) Elseif akActor.WornHasKeyword(zad_DeviousYoke) PlayThirdPersonAnimation(akActor, "ft_fall_over_yoke_1", 5, true) EndIf SexlabMoan(akActor) EndFunction I'm guess the way to do it would be to replace the "PlayThirdPersonAnimation" part with the "pushactoraway" command but I have no idea how to go about doing this. If anyone with scripting knowledge could lend me a hand, I would greatly appreciate it Link to comment
BreadDain Posted April 24, 2020 Share Posted April 24, 2020 https://www.creationkit.com/index.php?title=PushActorAway_-_ObjectReference Spoiler If !akActor.WornHasKeyword(zad_DeviousHeavyBondage) PlayThirdPersonAnimation(akActor, "ft_fall_over_reg_1", 5, true) Elseif akActor.WornHasKeyword(zad_DeviousArmBinder) PlayThirdPersonAnimation(akActor, "ft_fall_over_armbinder_1", 5, true) Elseif akActor.WornHasKeyword(zad_DeviousArmBinderElbow) PlayThirdPersonAnimation(akActor, "ft_fall_over_elbowbinder_1", 5, true) Elseif akActor.WornHasKeyword(zad_DeviousYokeBB) PlayThirdPersonAnimation(akActor, "ft_fall_over_bbyoke_1", 5, true) Elseif akActor.WornHasKeyword(zad_DeviousCuffsFront) PlayThirdPersonAnimation(akActor, "ft_fall_over_frontcuffs_1", 5, true) Elseif akActor.WornHasKeyword(zad_DeviousYoke) PlayThirdPersonAnimation(akActor, "ft_fall_over_yoke_1", 5, true) EndIf You might want to replace those lines with PushActorAway(akActor, 10.0) , but it will push actor to absolutely random direction. Changing 10 to 0 will make you character fall like sack of bones, so to make it really realistic you need to create somewhere behind the character and assign an object which defines direction of force applied. Spoiler if akActor == playerref && playerref.IsInCombat() return Endif This block prevents it from happening in combat, don't touch unless you want hardcore experience. Also note that I am quite apprentice in this stuff and might be wrong in something, but since there are no responses I gave it a try. Link to comment
Blue Astra Posted April 24, 2020 Author Share Posted April 24, 2020 Thanks for the input! I'll give it a go but I'm gonna have to figure out this whole compiling business Link to comment
Kyeckr Posted April 25, 2020 Share Posted April 25, 2020 This sounds rad, and I like the idea a lot. If you can swing the scripting on it, I would like to see the chance of tripping increased when sprinting and reduced when walking. MCM configurable with different variables for different kinds of restraints would similarly be fantastic, but requires a bunch more work. Link to comment
Bluegunk Posted April 26, 2020 Share Posted April 26, 2020 I think you have a cool mod in the making, Novatham? It would be nice to have this for SE's Heels Mods, like Charming High Heels, etc., any outfit that adds heels... ? But without a DD dependency. It always bothers me how my lady can belt around the country on heels and not go over. Link to comment
Blue Astra Posted April 26, 2020 Author Share Posted April 26, 2020 Thanks for the support guys but I think you're overestimating my abilities. I'm just trying to make a simple edit to the existing script and I'm failing miserably at that! Link to comment
Kyeckr Posted April 26, 2020 Share Posted April 26, 2020 On 4/24/2020 at 6:55 AM, CyberGox said: https://www.creationkit.com/index.php?title=PushActorAway_-_ObjectReference Hide contents If !akActor.WornHasKeyword(zad_DeviousHeavyBondage) PlayThirdPersonAnimation(akActor, "ft_fall_over_reg_1", 5, true) Elseif akActor.WornHasKeyword(zad_DeviousArmBinder) PlayThirdPersonAnimation(akActor, "ft_fall_over_armbinder_1", 5, true) Elseif akActor.WornHasKeyword(zad_DeviousArmBinderElbow) PlayThirdPersonAnimation(akActor, "ft_fall_over_elbowbinder_1", 5, true) Elseif akActor.WornHasKeyword(zad_DeviousYokeBB) PlayThirdPersonAnimation(akActor, "ft_fall_over_bbyoke_1", 5, true) Elseif akActor.WornHasKeyword(zad_DeviousCuffsFront) PlayThirdPersonAnimation(akActor, "ft_fall_over_frontcuffs_1", 5, true) Elseif akActor.WornHasKeyword(zad_DeviousYoke) PlayThirdPersonAnimation(akActor, "ft_fall_over_yoke_1", 5, true) EndIf You might want to replace those lines with PushActorAway(akActor, 10.0) , but it will push actor to absolutely random direction. Changing 10 to 0 will make you character fall like sack of bones, so to make it really realistic you need to create somewhere behind the character and assign an object which defines direction of force applied. Hide contents if akActor == playerref && playerref.IsInCombat() return Endif This block prevents it from happening in combat, don't touch unless you want hardcore experience. Also note that I am quite apprentice in this stuff and might be wrong in something, but since there are no responses I gave it a try. I'm actually curious how akActor.PushActorAway(akActor, X) would behave. From a literal standpoint, tripping on restraints would be an actor acting on themselves, but I have no idea how the game would handle this, or if it would even accept it in the first place. If one could capture the velocity of motion, that could be used to tune afKnockbackForce. Link to comment
Blue Astra Posted April 26, 2020 Author Share Posted April 26, 2020 37 minutes ago, Kyeckr said: I'm actually curious how akActor.PushActorAway(akActor, X) would behave. From a literal standpoint, tripping on restraints would be an actor acting on themselves, but I have no idea how the game would handle this, or if it would even accept it in the first place. If one could capture the velocity of motion, that could be used to tune afKnockbackForce. From my own in game testing using the console (just running along, opening the console, typing in "pushactoraway player 1", then closing console), I've found that it already takes into account your own velocity. The distance/speed you will trip over will change depending on if you're walking, jogging, or sprinting, all whilst using "pushactoraway player 1" Link to comment
Kyeckr Posted April 26, 2020 Share Posted April 26, 2020 9 minutes ago, Novatham said: From my own in game testing using the console (just running along, opening the console, typing in "pushactoraway player 1", then closing console), I've found that it already takes into account your own velocity. The distance/speed you will trip over will change depending on if you're walking, jogging, or sprinting, all whilst using "pushactoraway player 1" Sounds like a fairly simple and straightforward way to handle it then... Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now