It looks impossible

Post » Sat May 28, 2011 4:54 pm

I have a dead NPC that I wish to resurrect; I want him to get up off the floor. Now, you probably know that there's problem with this, in that the 'Resurrect 1' command causes the NPC to fall through the floor.

There's a solution: kill the NPC, Setunconscious, then resurrect. It works great. The problem is, I want my NPC to be in a particular position, so he's already dead (zero health). Killing him in this state make no difference - he still falls through the floor. I tried endless combinations of Kill, Setunconscious, Setghost without success. The only success I had was with killing a live NPC, which is no good (as he just sprawls down haphazardly).

Setting the NPC into combat mode eliminates the falling problem, but combat mode only comes into effect after the 'get up' idle has played, so the NPC starts to get up, falls through the floor, magically levitates back and then starts searching.

I tried creating a script that checks the NPC's Z position and if it drops forces it back, and discovered something interesting: the Z position does not change. The game (or part of it) does not seem to be aware that the model has fallen at all.

I'm close to concluding that this is impossible, but I wondered if anyone has found a solution.

Is it possible to do the equivalent of a TCL on an NPC? With TCL enabled on the player, 'gravity' ceases to exist. If I could do that for the duration of the 'get up' idle, that would solve the problem.
User avatar
Cameron Wood
 
Posts: 3384
Joined: Wed Oct 31, 2007 3:01 pm

Post » Sat May 28, 2011 2:38 pm

Does http://geck.gamesas.com/index.php/PlayIdle work on NPC's under the influence of http://geck.gamesas.com/index.php/SetUnconscious? If it does, then you could create a "pose" animation file in order to force them to take up the pose you want them to.

Cipscis
User avatar
Anne marie
 
Posts: 3454
Joined: Tue Jul 11, 2006 1:05 pm

Post » Sat May 28, 2011 7:46 am

Does http://geck.gamesas.com/index.php/PlayIdle work on NPC's under the influence of http://geck.gamesas.com/index.php/SetUnconscious? If it does, then you could create a "pose" animation file in order to force them to take up the pose you want them to.

Cipscis

I'm ahead of you there! :) No, I tried that, the problem is that the NPC has to be alive; while killed or at zero health, playidle doesn't work; and as soon as you resurrect, either the existing 'get up' idle plays (resurrect 1) or the NPC is instantly standing (resurrect 0).
User avatar
R.I.p MOmmy
 
Posts: 3463
Joined: Wed Sep 06, 2006 8:40 pm

Post » Sat May 28, 2011 2:33 pm

Have you tried killing them then using http://geck.gamesas.com/index.php/SetUnconscious right away to put them into a suspended state, then calling http://geck.gamesas.com/index.php/PlayIdle before resurrecting them?

If that doesn't work, what happens if you place them in the desired position, dead, in the GECK, then call http://geck.gamesas.com/index.php/SetUnconscious in an http://geck.gamesas.com/index.php/OnLoad block? I don't know if it would fix the problem with http://geck.gamesas.com/index.php/ResurrectActor, but it would be worth a shot.

Cipscis
User avatar
meghan lock
 
Posts: 3451
Joined: Thu Jan 11, 2007 10:26 pm

Post » Sat May 28, 2011 11:32 am

Have you tried killing them then using http://geck.gamesas.com/index.php/SetUnconscious right away to put them into a suspended state, then calling http://geck.gamesas.com/index.php/PlayIdle before resurrecting them?

If that doesn't work, what happens if you place them in the desired position, dead, in the GECK, then call http://geck.gamesas.com/index.php/SetUnconscious in an http://geck.gamesas.com/index.php/OnLoad block? I don't know if it would fix the problem with http://geck.gamesas.com/index.php/ResurrectActor, but it would be worth a shot.

Cipscis

In answer to the first question, yes, but playidle won't work unless the actor is alive and conscious.

As regarding killing/setunconscious, I've tried both in OnLoad, both in a separate trigger, both at the same time as Resurrect, and I've come to the conclusion that the Kill/Setunconscious fix doesn't work unless the NPC is actually alive first.

I'm starting to think that the best I can do is some sort of trick to draw the player's attention to the fact that the NPC is getting up then somehow hide the NPC until the combat state is activated (in other words, just hide the fact that the NPC is falling).
User avatar
Glu Glu
 
Posts: 3352
Joined: Sun Apr 01, 2007 5:39 am

Post » Sat May 28, 2011 4:56 pm

Will the player be able to interact with the NPC in any way before they get up? If not, then you could have them alive the whole time, and use the pose method to force them to assume the correct death pose, then cause them to get up some other way, such as via http://geck.gamesas.com/index.php/PushActorAway.

Cipscis
User avatar
Jennifer May
 
Posts: 3376
Joined: Thu Aug 16, 2007 3:51 pm

Post » Sat May 28, 2011 7:20 am

Will the player be able to interact with the NPC in any way before they get up? If not, then you could have them alive the whole time, and use the pose method to force them to assume the correct death pose, then cause them to get up some other way, such as via http://geck.gamesas.com/index.php/PushActorAway.

Cipscis

That's an idea I've toyed with, but there are two problems that I can see:

1) How does one force the actor into the correct position?

2) How does one prevent the actor from appearing on the player's compass while it is supposed to be 'dead'?
User avatar
Claire Lynham
 
Posts: 3432
Joined: Mon Feb 12, 2007 9:42 am

Post » Sat May 28, 2011 5:38 pm

Creating a pose animation, and forcing it on the actor via http://geck.gamesas.com/index.php/PlayIdle, could solve the first problem, although I don't know what would be required to do so.

I can't think of any way to solve the second problem though - all live actors will show up when they're close enough to the player. I'd forgotten about this, to be honest, because I always disable that section of the HUD via DarN's UI.

Cipscis
User avatar
Nancy RIP
 
Posts: 3519
Joined: Mon Jan 29, 2007 5:42 am

Post » Sat May 28, 2011 7:43 am

Creating a pose animation, and forcing it on the actor via http://geck.gamesas.com/index.php/PlayIdle, could solve the first problem, although I don't know what would be required to do so.

I can't think of any way to solve the second problem though - all live actors will show up when they're close enough to the player. I'd forgotten about this, to be honest, because I always disable that section of the HUD via DarN's UI.

Cipscis


I wouldn't even know where to begin to create a pose animation! However, you've given me an idea - thank you! There may be a suitable pose idle in one of the pose mods. I could try fiddling around with the position and line of sight so that the NPC is disabled until required: he would have to be enabled and forced into starting position just before the player was able to see him.
User avatar
Ian White
 
Posts: 3476
Joined: Thu Jul 19, 2007 8:08 pm

Post » Sat May 28, 2011 12:28 pm

What about having two actors, one dead and one in a suspended state with a pose applied? That way, you could disable the dead actor as you enable and resurrect the living actor. Hopefully the switch wouldn't be noticeable, and it would get around the issue of the compass indicator.

Cipscis
User avatar
John Moore
 
Posts: 3294
Joined: Sun Jun 10, 2007 8:18 am

Post » Sat May 28, 2011 8:28 am

What about having two actors, one dead and one in a suspended state with a pose applied? That way, you could disable the dead actor as you enable and resurrect the living actor. Hopefully the switch wouldn't be noticeable, and it would get around the issue of the compass indicator.

Cipscis

Yes, that would work as the player is sufficiently far away when this is all triggered to not notice the switch. However, will the disabled actor retain the pose?
User avatar
Tracy Byworth
 
Posts: 3403
Joined: Sun Jul 02, 2006 10:09 pm

Post » Sat May 28, 2011 1:57 pm

Yes, that would work as the player is sufficiently far away when this is all triggered to not notice the switch. However, will the disabled actor retain the pose?

Cipcis' idea is a good one, and probably the easiest solution -- replace the dead NPC with a live one. I'm not clear from the first post whether it matters that the player sees them get up. If it is, then yes you'll be playing with SetUnconcious and Resurrect 1 (I know what a pain this is, it took me days to get raising ghouls working using the correct sequence here), but if not you can simply swap actors when the player isn't looking (disable/enable or disable/placeatme). There's a very simple angle check you can use to do this, and it's quite instantaneous (meaning in the time it takes for a player to glance out of the field of view of the actor the switch has already happened):

	set fHeading to Player.GetHeadingAngle rNPC	if (((90 < fHeading) && (fHeading < 270)) || ((-270 < fHeading) && (fHeading < -90)))

Just need to set rNPC to the dead NPC. I use the above on a token.

2) How does one prevent the actor from appearing on the player's compass while it is supposed to be 'dead'?

http://geck.gamesas.com/index.php/SetGhost will do this for you. Note however that there are limitations (see link).
User avatar
Sarah Evason
 
Posts: 3507
Joined: Mon Nov 13, 2006 10:47 pm

Post » Sat May 28, 2011 6:23 am

Cipcis' idea is a good one, and probably the easiest solution -- replace the dead NPC with a live one. I'm not clear from the first post whether it matters that the player sees them get up. If it is, then yes you'll be playing with SetUnconcious and Resurrect 1 (I know what a pain this is, it took me days to get raising ghouls working using the correct sequence here), but if not you can simply swap actors when the player isn't looking (disable/enable or disable/placeatme). There's a very simple angle check you can use to do this, and it's quite instantaneous (meaning in the time it takes for a player to glance out of the field of view of the actor the switch has already happened):

	set fHeading to Player.GetHeadingAngle rNPC	if (((90 < fHeading) && (fHeading < 270)) || ((-270 < fHeading) && (fHeading < -90)))

Just need to set rNPC to the dead NPC. I use the above on a token.


http://geck.gamesas.com/index.php/SetGhost will do this for you. Note however that there are limitations (see link).


Thanks Martigen, your notes on 'resurrect' were very helpful (even though I couldn't get it to work on my NPC).

I tried SetGhost, but the NPC still appears on the compass.

I've managed to get this working satisfactorily now with the following arrangement:

1) NPC is alive and initially disabled.

2) First trigger causes the NPC to appear. Script on the NPC causes them to play a lying-down idle whilst restrained. This happens out of the player's sight.

3) Second trigger changes one of the 'Variable' actor values on the NPC, causing them to play the 'standing up' idle; after a delay to allow the idle to complete, the actor is then unrestrained.

This works because the NPC is out of sight of the player initially; otherwise, a second, dead actor would be needed, as you say.

So now I have a posed actor apparently rising from the dead!
User avatar
Sarah Bishop
 
Posts: 3387
Joined: Wed Oct 04, 2006 9:59 pm

Post » Sat May 28, 2011 8:30 am

Thanks Martigen, your notes on 'resurrect' were very helpful (even though I couldn't get it to work on my NPC).

I tried SetGhost, but the NPC still appears on the compass.

Whoops, apologies, long time since I used it on the Corpse Flies in MMM. Now that you mention it I think it doesn't remove them from the radar (not sure anything can, actually) but it does have enemies show up as green instead of red. This is the fix I used on the Corpse Flies as people were getting them confused with real threats. Then, to ensure they could be killed (if, er, you know you wanted to) I had an OnHit block that does SetGhost 0. Presumably if you've decided to shoot them, you'd expect them to show up hostile now.

I've managed to get this working satisfactorily now with the following arrangement:

1) NPC is alive and initially disabled.

2) First trigger causes the NPC to appear. Script on the NPC causes them to play a lying-down idle whilst restrained. This happens out of the player's sight.

3) Second trigger changes one of the 'Variable' actor values on the NPC, causing them to play the 'standing up' idle; after a delay to allow the idle to complete, the actor is then unrestrained.

This works because the NPC is out of sight of the player initially; otherwise, a second, dead actor would be needed, as you say.

So now I have a posed actor apparently rising from the dead!

Great! Sounds like a clean solution. I might have to ping you for advice on that soon -- I'm finally getting around to adding wounding effects to MMM and since Endurance no longer causes actors to pass out as in Oblivion, I'm going to need to use playidle (or playforward, I think) to trigger animations that make them look like they've staggered. I hadn't thought of using SetRestrained too, that may help.
User avatar
Prisca Lacour
 
Posts: 3375
Joined: Thu Mar 15, 2007 9:25 am

Post » Sat May 28, 2011 8:20 am

Great! Sounds like a clean solution. I might have to ping you for advice on that soon -- I'm finally getting around to adding wounding effects to MMM and since Endurance no longer causes actors to pass out as in Oblivion, I'm going to need to use playidle (or playforward, I think) to trigger animations that make them look like they've staggered. I hadn't thought of using SetRestrained too, that may help.


It was never Endurance that caused actors to fall over it was Fatigue and it still does -> my just released today SSP-ECM module uses Fatigue as a resource to do some alternate attacking and if you over use the attacks enemies will pop you while fatigued and you will drop over -> getting up takes less time as the player seems to regenerate Fatigue quite quickly in FO3 compaired to Oblivion though.
User avatar
Adrian Morales
 
Posts: 3474
Joined: Fri Aug 10, 2007 3:19 am

Post » Sat May 28, 2011 11:10 am

It was never Endurance that caused actors to fall over it was Fatigue and it still does -> my just released today SSP-ECM module uses Fatigue as a resource to do some alternate attacking and if you over use the attacks enemies will pop you while fatigued and you will drop over -> getting up takes less time as the player seems to regenerate Fatigue quite quickly in FO3 compaired to Oblivion though.

Yep, you're right, been out of moddng too long. I'll give Fatigue a go, will certainly simply the effect that forcing animations. Thanks Saiden.
User avatar
Rhiannon Jones
 
Posts: 3423
Joined: Thu Sep 21, 2006 3:18 pm


Return to Fallout 3