New to papyrus, could use some help

Post » Wed Jun 20, 2012 6:49 am

I'm proficient in C++ so coding isn't entirely new to me, but I could use some help scripting.
Basically I want to make a script to make a certain weapon throwable.

What are some keywords I should know about?
User avatar
Chloe Yarnall
 
Posts: 3461
Joined: Sun Oct 08, 2006 3:26 am

Post » Wed Jun 20, 2012 3:33 pm

Umm... I think you should get used to the language before you attempt something like that. I'd suggest reading up on the language documentation to know the functions, events, and objects you're going to need to use.

This particular task would involve more advanced use of the CK, you would probably need to to create a scripted spell, then utilize the "Apply Weapon Swing Spell" Entry Point available via Perk. As a guess you'd also probably need to create a projectile in shape of whatever weapon you intend on throwing, this would probably require some NifSkope skills and probably some knowledge of interpolation applied to the mesh. Alternatively you could have the spell remove the item from your hands, place it infront of you, then do some math to calculate the trajectory for a havok impulse to be applied to the object, at that point the damage would be entirely calculated on the physics system rather than a set amount of damage, probably based off of the objects mass and the acceleration applied from the havok impulse.

And by calculate the trajectory, I mean you'll need to calculate the direction and magnitude of the havok impulse to be applied in the direction your character is facing...
http://www.creationkit.com/ApplyHavokImpulse_-_ObjectReference
User avatar
Bee Baby
 
Posts: 3450
Joined: Sun Jun 18, 2006 4:47 am


Return to V - Skyrim