[REQ] 1handedweapon on back

Post » Wed Sep 01, 2010 10:45 am

It'll be useful in particular, if you got a 1handed spear. How much hard is to made a OBSE script, based on the reach of the weapon (my scripting skill is = 0 ) ? And could someone do that ?

Any suggestion ?
User avatar
Niisha
 
Posts: 3393
Joined: Fri Sep 15, 2006 2:54 am

Post » Wed Sep 01, 2010 9:38 pm

Well... I'd rather try to help you learn to do this yourself, rather than do it for you. I think I've put enough in this post to get you started. Feel free to post scripts you come up with for help!

Anyway, the idea behind this script is that the way the animations are set up, a weapon on the back has to be a two-handed weapon (or else the character will attempt to draw it from his waist and leave it on his back). However, you can change the weapon's handedness while it is drawn. So you want the weapon to be treated as a two-hander while sheathed, and then switch to a one-hander once it's been fully drawn. You then have to switch it back to being two-handed before it's sheathed. This all can be done with a combination of OBSE functions.

Basing this on the reach of the weapon is trivial (though you may get weapons you don't intend), as OBSE has a function to do that.

The functions you'd use, probably, are http://cs.elderscrolls.com/constwiki/index.php/GetEquippedObject, http://cs.elderscrolls.com/constwiki/index.php/GetWeaponReach, http://cs.elderscrolls.com/constwiki/index.php/IsWeaponOut, http://cs.elderscrolls.com/constwiki/index.php/DisableControl/http://cs.elderscrolls.com/constwiki/index.php/EnableControl, http://cs.elderscrolls.com/constwiki/index.php/OnControlDown, http://cs.elderscrolls.com/constwiki/index.php/TapControl, and http://cs.elderscrolls.com/constwiki/index.php/SetWeaponType. I recommend http://cs.elderscrolls.com/constwiki/index.php/Scripting_Tutorial:_My_Second_Script for learning the basics of scripting. The trickiest part if likely going to be disabling the "Draw/Sheathe" control while you've got the spear drawn, detecting when the player tries to sheathe it, change its type back to two-handed, and re-enable and tap the Draw/Sheathe key.
User avatar
Chloe Lou
 
Posts: 3476
Joined: Sat Nov 04, 2006 2:08 am

Post » Wed Sep 01, 2010 9:40 pm

Thanks for hints DragoonWraith, i'll let you know something if i get progress :)
User avatar
Michelle Serenity Boss
 
Posts: 3341
Joined: Tue Oct 17, 2006 10:49 am


Return to IV - Oblivion