Make a NPC fall on the ground

Post » Tue Jun 19, 2012 5:56 pm

Hi.
It's probably stupid, but I can't find how in a script (extend activemagiceffect, under a OnEffectStart) I can make an actor fall on the ground, like I would do if he would be dead.

It is to make a spell that just makes the akTarget fall on the ground, not kill him, and allowing him to "wake up" again immediatly.

Is there a PlayIdle or something ? Another way to do ?

Thanks. It's probably so simple...
User avatar
Logan Greenwood
 
Posts: 3416
Joined: Mon Jul 30, 2007 5:41 pm

Post » Tue Jun 19, 2012 2:49 pm

Haven't tried this yet, but a Papyrus function exists called "SetUnconscious"

esentially

SomeActor.SetUnconscious()

I would try this before posting, but I'm not at my computer. I've been wanting to see what it does. I am hoping it does exactly what you described. Pass out and hit the ground.
User avatar
Daddy Cool!
 
Posts: 3381
Joined: Tue Aug 21, 2007 5:34 pm

Post » Tue Jun 19, 2012 3:39 pm

No, this function doesn't make an actor fall. It just sets him unconscious, but still standing up, and even walking in slow motion cause of the unconsciousness.
I really just search for the way to tell a NPC "FALL, then you can do wathever you want".
User avatar
RAww DInsaww
 
Posts: 3439
Joined: Sun Feb 25, 2007 5:47 pm

Post » Tue Jun 19, 2012 9:41 pm

Nobody knows ?

I was looking at the Thief guild quest when we first meet Karliah, and she shoots the player.
But I find nothing. Just ta playidle(pGetUp) when the player is already out of the ruins.
User avatar
Krystina Proietti
 
Posts: 3388
Joined: Sat Dec 23, 2006 9:02 pm

Post » Tue Jun 19, 2012 9:52 pm

hmmm... standing up doesn't sound unconscious to me.

Have you played with
.ForceAddRagdollToWorld()

yet? Something else I haven't tried yet, but curious what it will do.
User avatar
Izzy Coleman
 
Posts: 3336
Joined: Tue Jun 20, 2006 3:34 am

Post » Tue Jun 19, 2012 2:46 pm

Nop, doesn't do anything at all.
For the try, I wrote this script, and have add it to a poison :

Scriptname FallPoison extends activemagiceffect  Event OnEffectStart(Actor akTarget, Actor akCaster)akTarget.SetUnconscious()EndEvent

It workds fine, but setting someone unconscious just means "closing his eyes, disallow him from moving and from talking". In fact, he sleeps standing up.

So, I tried the ragdoll :


Scriptname FallPoison extends activemagiceffect  Event OnEffectStart(Actor akTarget, Actor akCaster)akTarget.ForceAddRagdollToWorld()akTarget.SetUnconscious()EndEvent

But it doesn't do more, like that. I need another way... I guess there must be an Idle, but... i'm not friend with them yet.
User avatar
Leonie Connor
 
Posts: 3434
Joined: Mon Mar 12, 2007 4:18 pm

Post » Tue Jun 19, 2012 7:26 pm

Yeah... that's a clever idea. I've been able to play a few idles in the past (if the character isn't already busy). I saw this today in the forum though, you may be interested in it as well.

http://www.gamesas.com/topic/1350733-i-found-out-how-to-play-any-animation-at-any-time/page__fromsearch__1
User avatar
Maddy Paul
 
Posts: 3430
Joined: Wed Feb 14, 2007 4:20 pm

Post » Tue Jun 19, 2012 10:48 am

I'm interesting me at the SendAnimationEvent, in fact, i'm already on http://www.creationkit.com/SendAnimationEvent_-_Debug ^^. One more try with another function in my way to learn what's works or not, and how.
I'll try to find the "Death" animation, and send it to the NPC...

I will try to look out your link too.
User avatar
Darren Chandler
 
Posts: 3361
Joined: Mon Jun 25, 2007 9:03 am

Post » Tue Jun 19, 2012 10:27 am

Ok, it seems to work. I tried with a few animations (found in the Gameplay/animation menu), now I just have to find the correct one.
The "jumpFall" is lolly.
User avatar
natalie mccormick
 
Posts: 3415
Joined: Fri Aug 18, 2006 8:36 am

Post » Tue Jun 19, 2012 10:06 am

Cool!!! Can't wait to play with it too.
User avatar
Isabel Ruiz
 
Posts: 3447
Joined: Sat Nov 04, 2006 4:39 am

Post » Tue Jun 19, 2012 4:36 pm

How about applyhavokimpulse along setunconscious?
User avatar
Meghan Terry
 
Posts: 3414
Joined: Sun Aug 12, 2007 11:53 am

Post » Tue Jun 19, 2012 7:26 am

Paralyze does this, you could even give him paralyze as an ability who would let him be knocked out until you remove it.
Use an copy of the paralyze target effect and remove the visual effects.
You then need to make an spell with than effect and cast on target.
User avatar
CHANONE
 
Posts: 3377
Joined: Fri Mar 30, 2007 10:04 am

Post » Tue Jun 19, 2012 1:09 pm

That sounds fun.... probably won't emulate "falling down" maybe "falling up" or "sideways"... I'd love to find out.
User avatar
Miss Hayley
 
Posts: 3414
Joined: Tue Jun 27, 2006 2:31 am

Post » Tue Jun 19, 2012 8:02 pm

Paralyze does this, you could even give him paralyze as an ability who would let him be knocked out until you remove it.
Use an copy of the paralyze target effect and remove the visual effects.
You then need to make an spell with than effect and cast on target.
I would not. Paralyze does what the name means, it paralyses, and I would just like the body of the NPC falling down, like he's dying. Not like a giant stick.
I will continue to play with the SendAnimationEvent right now, I think.
User avatar
Hilm Music
 
Posts: 3357
Joined: Wed Jun 06, 2007 9:36 pm

Post » Tue Jun 19, 2012 8:41 pm

I found the "DeathAnim" animaiton. But it's not complete, and the NPC get stuck half in the ground...
I will search more.
User avatar
Samantha Mitchell
 
Posts: 3459
Joined: Mon Nov 13, 2006 8:33 pm

Post » Tue Jun 19, 2012 12:56 pm

Despite the name, Using applyhavokimpulse , you will send a NPC to the ground propperly. Then setunconscious could help avoiding it to stand up too early. paralising the NPC once on the ground afer aaplyhavokimpulse may also be usefull.
User avatar
Oscar Vazquez
 
Posts: 3418
Joined: Sun Sep 30, 2007 12:08 pm

Post » Tue Jun 19, 2012 9:13 pm

I found something.
I use the SendAnimationEvent "deathanim" and the actor falls on the ground. Then inconscious.

But the animation never stops : once he is on on the ground, even when he wakes up, he doesn't stand up.

Like that :



Scriptname FallPoison extends activemagiceffect Event OnEffectStart(Actor akTarget, Actor akCaster)Debug.SendAnimationEvent(akTarget, "deathanim")akTarget.SetUnconscious()EndEventEvent OnEffectFinish(Actor akTarget, Actor akCaster)akTarget.SetUnconscious(false)EndEvent

So, I will try the HavokImpulse, yes.

But, if I need to set up animations for other things, I would know how to revert the sendanimationevent, or stop it. Someone knows ?
User avatar
Dean Brown
 
Posts: 3472
Joined: Fri Aug 31, 2007 10:17 pm

Post » Tue Jun 19, 2012 4:19 pm

Well, when I use applyhavokimpulse, it doesn't apply anything.


Event OnEffectStart(Actor akTarget, Actor akCaster)akTarget.applyhavokimpulse(0.0, 0.0, 1.0, 250.0)akTarget.SetUnconscious()EndEvent
I tried with a Z axis of 1.0 and -1.0, with a magnitude of 1, 10, 50, 1000, 250.
But it doesn't apply any imulse on the akTarget.

Am I missing something ?

As X Y Z and magnitude are float, do I have to set up properties for them ?
User avatar
Curveballs On Phoenix
 
Posts: 3365
Joined: Sun Jul 01, 2007 4:43 am

Post » Tue Jun 19, 2012 7:34 pm

I'll answer this quickly:

When you place the actor/NPC, there should be a checkbox near the bottom that says something like "set dead", but I have no time to find the exact name of it. :P
User avatar
Myles
 
Posts: 3341
Joined: Sun Oct 21, 2007 12:52 pm

Post » Tue Jun 19, 2012 8:25 am

I don't want to place a setdead actor, I want to make an actor already alive in the game falling down, without killing him :smile:

I test that by a poison for now, but it could abe a spell too, it is scripted by extends activemagiceffect.


I will make it easiest :
The only question I have is : "What is the function or command to make the animation of SendAnimationEvent stop ?"
That's the only thing stopping me from finishing what I'm doing.
User avatar
Lauren Graves
 
Posts: 3343
Joined: Fri Aug 04, 2006 6:03 pm

Post » Tue Jun 19, 2012 7:52 am

Nobody knows ?
User avatar
Arnold Wet
 
Posts: 3353
Joined: Fri Jul 07, 2006 10:32 am

Post » Tue Jun 19, 2012 5:17 pm

Use PushActorAway(0). Should ragdoll with 0 force.
User avatar
Lawrence Armijo
 
Posts: 3446
Joined: Thu Sep 27, 2007 7:12 pm

Post » Tue Jun 19, 2012 6:35 pm

That works fine to make the actor fall ! Simple and nice function, i won't forget it.

But I have in the case another problem.
With this script, my target doesn't stay on the ground, it stand up even with closed eyes (unconscious).
The 15 sec of the Unconscious effect work fine.

Scriptname FallPoison extends activemagiceffect Event OnEffectStart(Actor akTarget, Actor akCaster)Game.GetPlayer().PushActorAway(akTarget, 0)akTarget.SetUnconscious()EndEventEvent OnEffectFinish(Actor akTarget, Actor akCaster)akTarget.SetUnconscious(false)EndEvent
I tried to add a paralyse spell to the target, but it doesn't do anything.
How can I script to force the NPC to stay on the ground for 15 sec ?
User avatar
Killer McCracken
 
Posts: 3456
Joined: Wed Feb 14, 2007 9:57 pm

Post » Tue Jun 19, 2012 1:07 pm

Can you really kill him, then bring him back to life?
User avatar
Bigze Stacks
 
Posts: 3309
Joined: Sun May 20, 2007 5:07 pm

Post » Tue Jun 19, 2012 6:54 pm

Erm, no, I can't.

Once this will work correctly, I will try to add a wake up on the unconscious NPC if the player walks near him, and if he's detecting him.
I can't do that if the NPC is dead.
User avatar
Nomee
 
Posts: 3382
Joined: Thu May 24, 2007 5:18 pm

Next

Return to V - Skyrim