Is this possible? Done before?

Post » Fri May 27, 2011 8:53 pm

I would like to make it so that an NPC can knock the player out if he attacks while undetected.

I have an idea of how to go about it, but don't know quite what is possible or not.

Basically I would use the Highwayman style of approaching the NPC without actually being in combat, so there is no battle music.

On reaching the player I could have the player get knocked out/down when that NPC is within talking distance and is not seen by the player.

The only way I know of is to use the players facing direction, to determine if the player is facing away from the NPC or not. But this is not quite how I would like it, because the player, in theory, could see the enemy but turn away afterwards and still get knocked out.

But how do I determine if the player has seen the NPC?
User avatar
Kelsey Anna Farley
 
Posts: 3433
Joined: Fri Jun 30, 2006 10:33 pm

Post » Fri May 27, 2011 2:56 pm

I am pretty sure there isn't a way to do exactly that, but you could make the highwayman invisible as that would have the same effect, the player wouldn't see him and he could "sneak up" on the player.

Or you could have some scenario occur to draw the players attention and while the player is investigating whatever just happened you enable the highwayman directly behind the player. This method would also eliminate footstep noises that would alert the player.

Edit: Fixed incredibly poor grammar.
User avatar
Darrell Fawcett
 
Posts: 3336
Joined: Tue May 22, 2007 12:16 am

Post » Fri May 27, 2011 8:42 am

Thanks for the suggestion, but I want the player to be able to spot the NPC if he sees him, so the player has a chance to not get hit by the attack.
User avatar
Solène We
 
Posts: 3470
Joined: Tue Mar 27, 2007 7:04 am

Post » Fri May 27, 2011 1:55 pm

Probably GetLOS would work for what you need.
User avatar
Alycia Leann grace
 
Posts: 3539
Joined: Tue Jun 26, 2007 10:07 pm

Post » Fri May 27, 2011 8:32 am

Ok, I have it working somewhat the way I want, except for one thing.

I decided a work around would be to have a script that places a disease onto the enemy when the players is looking the other way and then removed when the player looks at the enemy. If the enemy hits the player when his back is turned he will contract the disease which is scripted to drain all fatigue and then be removed, givng a knocked down effect.

However, this works fine for creatures, but not for enemies with weapons.

Is there anyway I can get a disease onto the player when the enemy has a weapon? What about bows and arrows?

Is there any other way that anyone can think of?
User avatar
Mylizards Dot com
 
Posts: 3379
Joined: Fri May 04, 2007 1:59 pm

Post » Fri May 27, 2011 10:33 am

If you can use OBSE you can use SetEquippedWeaponPoision, and change between your fatigue effect and probably use a potion if the attacker is detected. How are you scripting this, directly on the NPC?
User avatar
gemma
 
Posts: 3441
Joined: Tue Jul 25, 2006 7:10 am

Post » Sat May 28, 2011 12:20 am

I think I've solved the problem now thanks for your help.
User avatar
how solid
 
Posts: 3434
Joined: Mon Apr 23, 2007 5:27 am


Return to IV - Oblivion