[Papyrus] I need advice fora couple of checks.

Post » Tue Jun 19, 2012 1:30 am

Hey again :P I am so close to finishing my first project (alpha), but there are jsut a few little hurdles left for me to overcome! I will jsut number each question, and if any tips/ advice or answers can be given,it is greatly appreciated!

1. I want to script a statement that only fires if the player is struck by a certain type of enemy. (such as humans or beasts). I am guessing that this will be an EVENT onHit, but from what I know, akAggressor returns an ID, and cannot be used to check for an enemies classification?

2. I want to have an event that fires on an occasion where a players stamina is being used (Power attack). What is the best Event to use?

3. Would an onMagicEffectApply event be the best to check for a harmfull spell being cast at the player?

Thanks :D
User avatar
Haley Cooper
 
Posts: 3490
Joined: Wed Jun 14, 2006 11:30 am

Post » Mon Jun 18, 2012 10:46 pm

bumps
User avatar
Scared humanity
 
Posts: 3470
Joined: Tue Oct 16, 2007 3:41 am

Post » Mon Jun 18, 2012 3:01 pm

and a final bump before I let this die, and spend the rest of the week figuring it out. :/
User avatar
Hairul Hafis
 
Posts: 3516
Joined: Mon Oct 29, 2007 12:22 am

Post » Mon Jun 18, 2012 2:33 pm

For your first question, by adding an If condition with IsFaction, doesn't it get what you want ?
User avatar
lacy lake
 
Posts: 3450
Joined: Sun Dec 31, 2006 12:13 am

Post » Mon Jun 18, 2012 3:31 pm

Hey again :tongue: I am so close to finishing my first project (alpha), but there are jsut a few little hurdles left for me to overcome! I will jsut number each question, and if any tips/ advice or answers can be given,it is greatly appreciated!

1. I want to script a statement that only fires if the player is struck by a certain type of enemy. (such as humans or beasts). I am guessing that this will be an EVENT onHit, but from what I know, akAggressor returns an ID, and cannot be used to check for an enemies classification?

2. I want to have an event that fires on an occasion where a players stamina is being used (Power attack). What is the best Event to use?

3. Would an onMagicEffectApply event be the best to check for a harmfull spell being cast at the player?

Thanks :biggrin:

You can set your actor alias, and check
If akAggressor == MyActorAlias
;stuff here
endif

Should work.

2. Is tricky. You'll require an update event with custom timer. Set a variable to the player's current endurance. When the variable drops a certain amount, your event can pick it up.

3. Not sure
User avatar
CHangohh BOyy
 
Posts: 3462
Joined: Mon Aug 20, 2007 12:12 pm

Post » Mon Jun 18, 2012 6:12 pm

thanks for the help!, I'll mull over this info tonight and attack the problem tomorrow! :D
User avatar
Motionsharp
 
Posts: 3437
Joined: Sun Aug 06, 2006 1:33 am

Post » Mon Jun 18, 2012 11:02 am

Cool, so I have solved some problems, and some others not so :(

1. So a new problem is this.
Ability >effect(script) that performs a mana check on spell cast > cast spell > effect.

I tried using a onSpellCast effect but it doesnt seem to work, I beelive because I am performing it within an effect?

2. Paladin, what do you mean by "myactoralias" ? Could you give a simplified example say when a beast attacks the player? EDIT - Actaully, I see a nice easy way to do this using conditions on a magic effect, do these conditions work if the effect is cast from a script?

3. same as last time, I havent had a mess around with that yet, but I have a feeling it wont work.
User avatar
Anna Watts
 
Posts: 3476
Joined: Sat Jun 17, 2006 8:31 pm

Post » Mon Jun 18, 2012 1:13 pm

not sure about onSpellCast - i"ve never used it.

By "myactoralias" I meant your actor property. So make an Actor Property and point it to the player.
User avatar
Beulah Bell
 
Posts: 3372
Joined: Thu Nov 23, 2006 7:08 pm


Return to V - Skyrim