Jump to content

Recommended Posts

I am looking to create a Spell that does a sort of Force Choke effect on enemies - probably already exists, but I was looking to use the animations from FunnyBizness to get it just right.
Specifically an animation used for the Mage Rape 'romance' scene.

(It will be a private mod at first - if it looks good, then I will ask his permission to release it, or I will release the mod with his mod as a master etc )


I figured that with the enemies clothes on - it could be a reasonable approximation to a force choke / levitate / telekinetic attack spell.

The only thing I do not want to do - is use ApplyHavokImpulse - because then we end up in a ragdoll state which does not look very lore friendly, it just looks like I am levitating a scarecrow or a bag of spuds.

 

My first impressions are that I could

 

1. SetMotionType to Motion_Keyframed - which should prevent havok physics from affecting it - so if I move the character up into the air, they should stay there? Right?

2. Use TranslateToRef to move the Keyframed actor upwards towards an XMarker (this could be maybe 2-3 feet above their starting position) - this comes with a speed argument so I can make it a fast or slow elevation.

3. While they are being moved - they are playing the animation to make it look like they are struggling to get free.

4. After the effect expires - they are released and ragdolled

 

My main question about SetMotionType - will this immobilize actors, or should I take care of that myself?
If I am not mistaken, there is an Actor Value that should freeze/paralyze actors - just want to make sure that while are immobilized, that they can still animate etc

 

In any case- the spell effect will end and ragdoll the actor, dropping them to the ground- by setting their SetMotionType back to dynamic and giving them a gentle havok impulse to restart their physics.

 

Does anyone have experience with the Motion_Keyframed - does it sound like the sort of thing I would need to use for this purpose?

 

Link to comment
Share on other sites

I was looking to use the animations from FunnyBizness to get it just right.

Specifically an animation used for the Mage Rape 'romance' scene.

3. While they are being moved - they are playing the animation to make it look like they are struggling to get free.

Jesus Christ. At first it didn't quite click what you were trying to do but then I kept reading.

 

Looks like you know what you're doing. What's currently not working the way you want?

The VL telekinesis spell archetype is kind of similar but I'm guessing you already know about it and didn't want to use it. Thought I'd mention it anyway.

Link to comment
Share on other sites

I wouldn't think any of the functions SetMotionType or TranslateToRef would work with actors, but if you find out something else, then I'm keeping my eye on this thread ;) If I were you I would look into how the paralyze spell works, then try to do the same and then play the custom animation via script. But really don't expect too much in your effort to lift the actor from the ground while having him play an animation.

Link to comment
Share on other sites

I am in the process of trying to script this - but it looks like when an actor is cast to object reference, you cannot use PlayAnimation on it - at least, the npc I am targeting does not respond to it.
Can anyone confirm the appropriate method of forcing an NPC to play an animation.
I came across PlayIdle - but will that work in combat?

Link to comment
Share on other sites

Think I am making progress- I had a big hiatus from Papyrus so its taking time to get reacquainted.

This so far is able to force the animation onto the npc I target with the spell.
After I get the animation finalized, then I just need to do the levitation - which I think will be a case of turning off his havok physics and translating him upwards.

Scriptname baaForceLiftScript extends activemagiceffect  


Actor Property SpellSubject Auto


Event OnEffectStart(Actor akTarget, Actor akCaster)
  Debug.Notification("Registering");
  SpellSubject = akTarget;
  RegisterForSingleUpdate(1.0)    ;we will run updates every second, this should be fast enough whilst not being too fast/expensive.


EndEvent


Event OnUpdate()
Debug.Notification("Single Update");
RegisterForSingleUpdate(1.0)


Debug.SendAnimationEvent(SpellSubject,"FB_MageRape_A1_S1")
UnregisterForUpdate()    ;we don't want to send this multiple times.


EndEvent


Event OnEffectFinish(Actor akTarget, Actor akCaster)  ;when they die or spell duration expires.
Debug.Notification("End");
UnregisterForUpdate()


EndEvent
Link to comment
Share on other sites

Scriptname baaForceLiftScript extends activemagiceffect  

Actor Property SpellSubject Auto

float targetX;
float targetY;
float targetZ;


Event OnEffectStart(Actor akTarget, Actor akCaster)
  SpellSubject = akTarget;
  targetX = akTarget.GetPositionX();
  targetY = akTarget.GetPositionY() ;
  targetZ = akTarget.GetPositionZ() + 65.00 ;
  RegisterForSingleUpdate(1.0)    ;we will run updates every second, this should be fast enough whilst not being too fast/expensive.
  
EndEvent

Event OnUpdate()
	
       SpellSubject.SetMotionType(4)
	Debug.SendAnimationEvent(SpellSubject,"FB_MageRape2_A1_S1")
       SpellSubject.TranslateTo(targetX, targetY, targetZ, 0.0, 0.0, 0.0, 7.0)
	UnregisterForUpdate()    ;we don't want to send this multiple times.
       
EndEvent

Event OnEffectFinish(Actor akTarget, Actor akCaster)  ;when they die or spell duration expires.
	
       SpellSubject .StopTranslation()
       Debug.SendAnimationEvent(SpellSubject,"IdleForceDefaultState")
       SpellSubject.SetMotionType(7)
       SpellSubject.SetActorValue("Paralysis",1)
       Game.GetPlayer().PushActorAway(SpellSubject, 0.0)
	SpellSubject.ApplyHavokImpulse(0.0,-1.0, 0.0, 5);
      SpellSubject.SetActorValue("Paralysis",0)
      UnregisterForUpdate()
EndEvent

This code seems to work - the actor performs the relevant animation, and slowly floats upwards.

Might be better if there is some struggle / pain sounds to go with it.

The Paralysis and HavokImpulse is to ragdoll the actor when they fall back to earth.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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