Jump to content

Doesn't PushActorAway accept negative values anymore?


Recommended Posts

Hi all,

 

I've been banging my head against the wall for awhile trying to get this to work. I'm trying to create a trap of sorts that pulls ragdoll'd actors towards it. I thought this would be simple, just PushActorAway with negative values like Skyrim.

However, no matter WHAT I do, negative values just cause the actor to crumple to the ground, like their legs simply gave out. They are never pulled towards the caster.

 

I've tried first softly bouncing them in an upward vector first, thinking maybe that would help, but there is no identifiable effect of the following negative Push value, even if I crank it up to absurd numbers.

 

Has anyone been able to get a pull affect, or have they changed the way this works since Skyrim? (see verteiron's Katamari Dovahkin mod, it obviously worked then, lol)

 

Example code:

Event OnEffectStart(Actor akTarget, Actor akCaster)

;Idea 2 - I've also tried softly bouncing them into the air from a marker below first to see if that helped...it didn't.
	;PullTarget = akTarget.PlaceAtMe(XMarkerHeading,1,false,true)
	;PullTarget.PushActorAway(akTarget,5)
	;Utility.Wait(0.2)

;Here's the simple bit that would have worked in Skyrim, but is just making them fall over now.
	akCaster.PushActorAway(akTarget, -20)

EndEvent
Link to comment
Share on other sites

I don't think so. The XmarkerHeading needs to be facing in the direction you want the actor to go, I'm assuming xmarkerheadings are facing "north"(the pointed portion) when spawned. If facing the player, then the actor will be pushed (or "pulled") to the player.

 

To flip the direction, you can try pullTarget.SetAngle(0, 0, pullTarget.GetAngleZ() - 180) or minus its current angle Z.

 

I'm not totally sure about that though.

 

Edit: Have you tried higher values?

Edited by Rasikko
Link to comment
Share on other sites

The marker was only ever a plan B (as you can see by the comment and the reason that section of code is commented out), really the only thing that SHOULD be needed to work is akCaster.PushActorAway(akTarget, -x) but as I say, even ludicrously high numbers just make them fall down. It's almost as if a negative number triggers the ragdoll, but is truncated to 0 so no force is applied.

I know that I could use a marker placed behind them to push them towards the trap.

I've already tried that as proof of concept (in addition to the marker being above their head and first pulling them up or below and bouncing them, as in the code), but they would obviously overshoot the trap, not actually be sucked onto it (think gravity-well, or how the the Katamari Dovahkin mod works). Pushing is too ham-fisted, it really does need to be a continuous negative-value "pull" but it just isn't working like in Skyrim.

Edited by mmdestiny
Link to comment
Share on other sites

Interesting. I'm wondering if I might be able to create an equation that determines the impulse vector and intensity based on distance to the trap, so that I can minimize overshooting. If I can do that, I could probably repeat the affect until I want the trap to "release" the target.
Link to comment
Share on other sites

Ok.. you're next alternative is using ApplyHavokImpluse(yes I'm suggesting the method here:https://www.creationkit.com/index.php?title=ApplyHavokImpulse_-_ObjectReference) to force them into a "pull-like" motion.. or in other words, fake it.

 

Otherwise, I don't know, but I put it on the talk page that negative values aren't working as before.

Impulses were the answer. Apply a little trigonometry, and I can continually adjust the vector and intensity to re-pulse until they are on top of the trap, then just pulse straight down to keep them there. :wink:

 

Thanks for the help!

Edited by mmdestiny
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...